summaryrefslogtreecommitdiff
path: root/src/script/bridge/qscriptqobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/bridge/qscriptqobject.cpp')
-rw-r--r--src/script/bridge/qscriptqobject.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index 962479f..807c94c 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -2092,7 +2092,13 @@ void QObjectConnectionManager::execute(int slotIndex, void **argv)
}
}
}
- Q_ASSERT(slot && slot.isObject());
+ if (!slot) {
+ // This connection no longer exists (can happen if the signal is
+ // emitted from another thread and the call gets queued, but the
+ // connection is removed before the QMetaCallEvent gets processed).
+ return;
+ }
+ Q_ASSERT(slot.isObject());
if (engine->isCollecting()) {
qWarning("QtScript: can't execute signal handler during GC");