From 5067369f76f1f0db140a0e4c2c9af43982290183 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 18 Apr 2002 20:56:23 +0000 Subject: [PATCH] fix 2 bus errors on osx: - it's std::string doesnt like being set to NULL. - in Window.cc, caught someone using a membr variable after calling 'delete this'. bad. --- src/Screen.cc | 9 +++++++-- src/Window.cc | 3 +-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index 313aeb21..4f4718ec 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1402,8 +1402,13 @@ void BScreen::removeWorkspaceNames(void) { void BScreen::LoadStyle(void) { Resource &conf = resource.styleconfig; - conf.setFile(openbox.getStyleFilename()); - if (!conf.load()) { + const char *sfile = openbox.getStyleFilename(); + bool loaded = false; + if (sfile != NULL) { + conf.setFile(sfile); + loaded = conf.load(); + } + if (!loaded) { conf.setFile(DEFAULTSTYLE); if (!conf.load()) { fprintf(stderr, i18n->getMessage(ScreenSet, ScreenDefaultStyleLoadFail, diff --git a/src/Window.cc b/src/Window.cc index c2e8644b..56487e0b 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -168,9 +168,8 @@ OpenboxWindow::OpenboxWindow(Openbox &o, Window w, BScreen *s) : openbox(o) { #ifdef SLIT if (client.initial_state == WithdrawnState) { screen->getSlit()->addClient(client.window); - delete this; - openbox.ungrab(); + delete this; return; } #endif // SLIT -- 2.45.2