Description: In the odd case that Qt is running on a secondary thread, the main thread instance will have been dereffed asunder because of the deref in QThreadData::current and the deref in the pthread_destroy. To avoid crashing during QCoreApplicationData s global static cleanup we need to safeguard the main thread here. This fix is a bit crude, but it solves the problem for Linux.
To Search:
File list (Check if you may need any files):
qthread.cpp
qthread.h
qthread_p.h