diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-01-13 01:49:50 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-01-13 01:49:50 (GMT) |
commit | c6099d777d844699fb8a4243921159898bc4f45c (patch) | |
tree | 3955299c2b11f4fe3f6b822460d5f154fd4f8d28 /src/Toolbar.cc | |
parent | 5b7bde2ffbac62f75cb8539f5ab43bb5f4274eae (diff) | |
download | fluxbox_pavel-c6099d777d844699fb8a4243921159898bc4f45c.zip fluxbox_pavel-c6099d777d844699fb8a4243921159898bc4f45c.tar.bz2 |
fix crashes on restart
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r-- | src/Toolbar.cc | 3 |
1 files changed, 2 insertions, 1 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 | ||
289 | Toolbar::~Toolbar() { | 289 | Toolbar::~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) |