From 09d080c07ca7e500fd7134de7c5442af24618b27 Mon Sep 17 00:00:00 2001 From: ormorph Date: Thu, 15 Aug 2024 15:35:12 +0300 Subject: [PATCH] Added check for tqApp pointer in TQWidget destructor Necessary for the application to shut down properly Signed-off-by: ormorph (cherry picked from commit c55ef27a2c511c29a8a82d00bd2ede1fb02cfa41) --- src/kernel/qwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();