diff options
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 6dfa7c3e67..3254f2a9fe 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -1820,7 +1820,7 @@ void QObject::moveToThread(QThread *targetThread) QThreadData *thisThreadData = d->threadData.loadAcquire(); if (!thisThreadData->thread.loadRelaxed() && currentData == targetData) { // one exception to the rule: we allow moving objects with no thread affinity to the current thread - currentData = d->threadData; + currentData = thisThreadData; } else if (thisThreadData != currentData) { qWarning("QObject::moveToThread: Current thread (%p) is not the object's thread (%p).\n" "Cannot move to target thread (%p)\n", |