summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-12-06 18:30:05 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-12-06 18:30:05 -0600
commitf1f1d2243299cd1115002e5b5047e9c3a0a73134 (patch)
tree291f73c3407887b9d524ff9ea34dc93c2d31b879 /src
parent3f5dc49edf41359f18e7c94c28a345a9600eb44f (diff)
downloadtqt3-f1f1d2243299cd1115002e5b5047e9c3a0a73134.tar.gz
tqt3-f1f1d2243299cd1115002e5b5047e9c3a0a73134.zip
Automated update from Qt3
Diffstat (limited to 'src')
-rw-r--r--src/kernel/qapplication.cpp9
-rw-r--r--src/kernel/qeventloop_unix.cpp2
-rw-r--r--src/kernel/qeventloop_x11.cpp6
3 files changed, 13 insertions, 4 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp
index 5b57bd249..6fade0228 100644
--- a/src/kernel/qapplication.cpp
+++ b/src/kernel/qapplication.cpp
@@ -2767,7 +2767,10 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
if (!handled) {
#if defined(QT_THREAD_SUPPORT)
- bool locked = TQApplication::tqt_mutex->locked();
+ bool locked = false;
+ if (TQApplication::tqt_mutex) {
+ locked = TQApplication::tqt_mutex->locked();
+ }
if (locked) {
TQApplication::tqt_mutex->unlock();
}
@@ -2775,7 +2778,9 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
consumed = receiver->event( e );
#if defined(QT_THREAD_SUPPORT)
if (locked) {
- TQApplication::tqt_mutex->lock();
+ if (TQApplication::tqt_mutex) {
+ TQApplication::tqt_mutex->lock();
+ }
}
#endif
}
diff --git a/src/kernel/qeventloop_unix.cpp b/src/kernel/qeventloop_unix.cpp
index ccdbb4b8d..1c391f413 100644
--- a/src/kernel/qeventloop_unix.cpp
+++ b/src/kernel/qeventloop_unix.cpp
@@ -562,6 +562,8 @@ int TQEventLoop::activateTimers()
n_act++;
TQTimerEvent e( t->id );
TQApplication::sendEvent( t->obj, &e ); // send event
+ if ( !timerList ) // sendEvent allows other threads to execute, therefore we must check for list existence when it returns!
+ return 0;
if ( timerList->findRef( begin ) == -1 )
begin = 0;
}
diff --git a/src/kernel/qeventloop_x11.cpp b/src/kernel/qeventloop_x11.cpp
index a2d8590f6..a733c115d 100644
--- a/src/kernel/qeventloop_x11.cpp
+++ b/src/kernel/qeventloop_x11.cpp
@@ -284,7 +284,8 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
// unlock the GUI mutex and select. when we return from this function, there is
// something for us to do
#if defined(QT_THREAD_SUPPORT)
- locker.mutex()->unlock();
+ if ( locker.mutex() ) locker.mutex()->unlock();
+ else return false;
#endif
int nsel;
@@ -298,7 +299,8 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
// relock the GUI mutex before processing any pending events
#if defined(QT_THREAD_SUPPORT)
- locker.mutex()->lock();
+ if ( locker.mutex() ) locker.mutex()->lock();
+ else return false;
#endif
// we are awake, broadcast it