diff --git a/src/kernel/qwidget.cpp b/src/kernel/qwidget.cpp index 1af274c6..0c76bd3b 100644 --- a/src/kernel/qwidget.cpp +++ b/src/kernel/qwidget.cpp @@ -988,8 +988,8 @@ TQWidget::~TQWidget() tqApp->quit(); } - if ( hasFocus() ) - clearFocus(); + if ( tqApp && hasFocus() ) + clearFocus(); if ( isTopLevel() && isShown() && winId() ) hide();