summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorormorph <roma251078@mail.ru>2024-08-15 15:35:12 +0300
committerormorph <roma251078@mail.ru>2024-08-16 05:36:13 +0300
commitc55ef27a2c511c29a8a82d00bd2ede1fb02cfa41 (patch)
tree5c88b20d72e275f08634d8e23a10f10539266f7d
parent42957a3f812a1db64a9ae452baa2d3fbc35f2466 (diff)
downloadtqt3-c55ef27a2c511c29a8a82d00bd2ede1fb02cfa41.tar.gz
tqt3-c55ef27a2c511c29a8a82d00bd2ede1fb02cfa41.zip
Added check for tqApp pointer in TQWidget destructor
Necessary for the application to shut down properly Signed-off-by: ormorph <roma251078@mail.ru>
-rw-r--r--src/kernel/tqwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/tqwidget.cpp b/src/kernel/tqwidget.cpp
index 6892af3b7..d804f28f1 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();