summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-04-18 20:56:23 +0000
committerDana Jansens <danakj@orodu.net>2002-04-18 20:56:23 +0000
commit5067369f76f1f0db140a0e4c2c9af43982290183 (patch)
treeeb8d591b9225cb6422e80072586401ec56da71a1 /src
parent1b129560d033d6c560bb99e5e8465a3b075623cd (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc9
-rw-r--r--src/Window.cc3
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