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.
This commit is contained in:
parent
1b129560d0
commit
5067369f76
2 changed files with 8 additions and 4 deletions
|
@ -1402,8 +1402,13 @@ void BScreen::removeWorkspaceNames(void) {
|
||||||
void BScreen::LoadStyle(void) {
|
void BScreen::LoadStyle(void) {
|
||||||
Resource &conf = resource.styleconfig;
|
Resource &conf = resource.styleconfig;
|
||||||
|
|
||||||
conf.setFile(openbox.getStyleFilename());
|
const char *sfile = openbox.getStyleFilename();
|
||||||
if (!conf.load()) {
|
bool loaded = false;
|
||||||
|
if (sfile != NULL) {
|
||||||
|
conf.setFile(sfile);
|
||||||
|
loaded = conf.load();
|
||||||
|
}
|
||||||
|
if (!loaded) {
|
||||||
conf.setFile(DEFAULTSTYLE);
|
conf.setFile(DEFAULTSTYLE);
|
||||||
if (!conf.load()) {
|
if (!conf.load()) {
|
||||||
fprintf(stderr, i18n->getMessage(ScreenSet, ScreenDefaultStyleLoadFail,
|
fprintf(stderr, i18n->getMessage(ScreenSet, ScreenDefaultStyleLoadFail,
|
||||||
|
|
|
@ -168,9 +168,8 @@ OpenboxWindow::OpenboxWindow(Openbox &o, Window w, BScreen *s) : openbox(o) {
|
||||||
#ifdef SLIT
|
#ifdef SLIT
|
||||||
if (client.initial_state == WithdrawnState) {
|
if (client.initial_state == WithdrawnState) {
|
||||||
screen->getSlit()->addClient(client.window);
|
screen->getSlit()->addClient(client.window);
|
||||||
delete this;
|
|
||||||
|
|
||||||
openbox.ungrab();
|
openbox.ungrab();
|
||||||
|
delete this;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif // SLIT
|
#endif // SLIT
|
||||||
|
|
Loading…
Reference in a new issue