summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kernel/qapplication.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp
index 76b265926..d67df12b0 100644
--- a/src/kernel/qapplication.cpp
+++ b/src/kernel/qapplication.cpp
@@ -2931,7 +2931,14 @@ int TQApplication::exec()
*/
void TQApplication::exit( int retcode )
{
- tqApp->eventLoop()->exit( retcode );
+ TQThread* thread = tqApp->guiThread();
+ if (thread) {
+ if (thread->d) {
+ if (thread->d->eventLoop) {
+ thread->d->eventLoop->exit( retcode );
+ }
+ }
+ }
}
/*!