diff --git a/src/kernel/tqwidget.cpp b/src/kernel/tqwidget.cpp index 6892af3b..d804f28f 100644 --- a/src/kernel/tqwidget.cpp +++ b/src/kernel/tqwidget.cpp @@ -983,8 +983,8 @@ TQWidget::~TQWidget() tqApp->quit(); } - if ( hasFocus() ) - clearFocus(); + if ( tqApp && hasFocus() ) + clearFocus(); if ( isTopLevel() && isShown() && winId() ) hide();