summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/kernel/qthread_unix.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/qthread_unix.cpp b/src/kernel/qthread_unix.cpp
index 6a6f81b7..bac4ea1c 100644
--- a/src/kernel/qthread_unix.cpp
+++ b/src/kernel/qthread_unix.cpp
@@ -183,6 +183,10 @@ void TQThreadInstance::finish( void * )
void TQThreadInstance::finishGuiThread(TQThreadInstance *d) {
TQThreadStorageData::finish( d->thread_storage );
d->thread_storage = 0;
+
+ // You should use TQApplication::currentThread() to check if GUI thread wasn't yet destroyed,
+ // but just in case we better cleanup the pointer here as well.
+ setCurrentThread(0);
}
TQMutex *TQThreadInstance::mutex() const