Reset TQThreadInstance::currentThread() value when destroying main thread

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
fix/issue/142-r1
Alexander Golubev 1 month ago
parent 3b9a744a7b
commit d42a73f06f

@ -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

Loading…
Cancel
Save