Fix crash on thread termination

pull/2/head
Timothy Pearson 11 years ago
parent 17ffc1e193
commit 8ff73908ee

@ -3732,7 +3732,7 @@ void QApplication::removePostedEvent( QEvent * event )
void qThreadTerminationHandlerRecursive( QObject* object, QThread* originThread, QThread* destinationThread ) {
#ifdef QT_THREAD_SUPPORT
QThread* objectThread = object->contextThreadObject();
if (objectThread != destinationThread) {
if (objectThread && (objectThread != destinationThread)) {
QThread::CleanupType cleanupType = objectThread->cleanupType();
if (cleanupType == QThread::CleanupMergeObjects) {
object->moveToThread(destinationThread);

Loading…
Cancel
Save