summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Toolbar.cc3
-rw-r--r--src/fluxbox.cc15
2 files changed, 9 insertions, 9 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 89ba9cf..18f07fc 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -287,7 +287,8 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, size_t width):
287} 287}
288 288
289Toolbar::~Toolbar() { 289Toolbar::~Toolbar() {
290 Fluxbox::instance()->keys()->unregisterWindow(window().window()); 290 if (Fluxbox::instance()->keys())
291 Fluxbox::instance()->keys()->unregisterWindow(window().window());
291 FbTk::EventManager::instance()->remove(window()); 292 FbTk::EventManager::instance()->remove(window());
292 // remove menu items before we delete tools so we dont end up 293 // remove menu items before we delete tools so we dont end up
293 // with dangling pointers to old submenu items (internal menus) 294 // with dangling pointers to old submenu items (internal menus)
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 110123c..d45a45e 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -420,14 +420,6 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
420 420
421Fluxbox::~Fluxbox() { 421Fluxbox::~Fluxbox() {
422 422
423 // destroy atomhandlers
424 for (AtomHandlerContainerIt it= m_atomhandler.begin();
425 it != m_atomhandler.end();
426 it++) {
427 delete (*it).first;
428 }
429 m_atomhandler.clear();
430
431 // this needs to be destroyed before screens; otherwise, menus stored in 423 // this needs to be destroyed before screens; otherwise, menus stored in
432 // key commands cause a segfault when the XLayerItem is destroyed 424 // key commands cause a segfault when the XLayerItem is destroyed
433 m_key.reset(0); 425 m_key.reset(0);
@@ -438,6 +430,13 @@ Fluxbox::~Fluxbox() {
438 m_screen_list.pop_back(); 430 m_screen_list.pop_back();
439 } 431 }
440 432
433 // destroy atomhandlers
434 for (AtomHandlerContainerIt it= m_atomhandler.begin();
435 it != m_atomhandler.end();
436 it++) {
437 delete (*it).first;
438 }
439 m_atomhandler.clear();
441 440
442 clearMenuFilenames(); 441 clearMenuFilenames();
443} 442}