summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/kernel/qobject.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 5d6e4d7..1f716bc 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -163,14 +163,15 @@ QObjectPrivate::~QObjectPrivate()
{
if (pendTimer) {
// unregister pending timers
- if (threadData->eventDispatcher)
+ if (threadData && threadData->eventDispatcher)
threadData->eventDispatcher->unregisterTimers(q_ptr);
}
if (postedEvents)
QCoreApplication::removePostedEvents(q_ptr, 0);
- threadData->deref();
+ if (threadData)
+ threadData->deref();
delete static_cast<QAbstractDynamicMetaObject*>(metaObject);
#ifdef QT_JAMBI_BUILD