fix crashes from dangling pointer

This commit is contained in:
Mark Tiefenbruck 2008-06-17 09:21:41 -07:00
parent be3ac3723d
commit 68d8aa60b6

View file

@ -326,6 +326,8 @@ FluxboxWindow::FluxboxWindow(WinClient &client, FbTk::XLayer &layer):
FluxboxWindow::~FluxboxWindow() {
if (WindowCmd<void>::window() == this)
WindowCmd<void>::setWindow(0);
if (FbMenu::window() == this)
FbMenu::setWindow(0);
if ( Fluxbox::instance()->keys() != 0 ) {
Fluxbox::instance()->keys()->
unregisterWindow(frame().window().window());