summaryrefslogtreecommitdiffstats
path: root/src/kernel/qeventloop_unix_glib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/qeventloop_unix_glib.cpp')
-rw-r--r--src/kernel/qeventloop_unix_glib.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/kernel/qeventloop_unix_glib.cpp b/src/kernel/qeventloop_unix_glib.cpp
index feff675..c41acce 100644
--- a/src/kernel/qeventloop_unix_glib.cpp
+++ b/src/kernel/qeventloop_unix_glib.cpp
@@ -688,7 +688,9 @@ int QEventLoop::activateTimers()
QTimerEvent e( t->id );
#if defined(QT_THREAD_SUPPORT)
// Be careful...the current thread may not be the target object's thread!
- if ((!t->obj) || (QThread::currentThreadObject()->threadPostedEventsDisabled()) || (t->obj && (t->obj->contextThreadObject() == QThread::currentThreadObject()))) {
+ if ((!t->obj) ||
+ (QThread::currentThreadObject() && QThread::currentThreadObject()->threadPostedEventsDisabled()) ||
+ (t->obj && t->obj->contextThreadObject() == QThread::currentThreadObject())) {
QApplication::sendEvent( t->obj, &e ); // send event
}
else {
@@ -731,7 +733,9 @@ int QEventLoop::activateSocketNotifiers()
sn->pending = FALSE;
#if defined(QT_THREAD_SUPPORT)
// Be careful...the current thread may not be the target object's thread!
- if ((!sn->obj) || (QThread::currentThreadObject()->threadPostedEventsDisabled()) || (sn->obj && (sn->obj->contextThreadObject() == QThread::currentThreadObject()))) {
+ if ((!sn->obj) ||
+ (QThread::currentThreadObject() && QThread::currentThreadObject()->threadPostedEventsDisabled()) ||
+ (sn->obj && sn->obj->contextThreadObject() == QThread::currentThreadObject())) {
QApplication::sendEvent( sn->obj, &event ); // send event
}
else {