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.
Dana Jansens danakj@orodu.net
2 files changed,
8 insertions(+),
4 deletions(-)
M
src/Screen.cc
→
src/Screen.cc
@@ -1402,8 +1402,13 @@
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,
M
src/Window.cc
→
src/Window.cc
@@ -168,9 +168,8 @@
#ifdef SLIT if (client.initial_state == WithdrawnState) { screen->getSlit()->addClient(client.window); + openbox.ungrab(); delete this; - - openbox.ungrab(); return; } #endif // SLIT