diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-04-18 20:56:23 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-04-18 20:56:23 +0000 |
| commit | 5067369f76f1f0db140a0e4c2c9af43982290183 (patch) | |
| tree | eb8d591b9225cb6422e80072586401ec56da71a1 /src/Screen.cc | |
| parent | 1b129560d033d6c560bb99e5e8465a3b075623cd (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/Screen.cc')
| -rw-r--r-- | src/Screen.cc | 9 |
1 files changed, 7 insertions, 2 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, |
