summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-03-10 15:51:18 -0600
committerTimothy Pearson <[email protected]>2012-03-10 15:51:18 -0600
commit1db4f237a710955a817c7aca65a716d85573304b (patch)
treedac93dc91f4441475511797d6b377f4eec344d5f
parentb4eece7cc6ded028251408312d7b7f2aa69fe10a (diff)
downloadqt3-1db4f237a710955a817c7aca65a716d85573304b.tar.gz
qt3-1db4f237a710955a817c7aca65a716d85573304b.zip
Fix potential crash when Qt3 is used as part of another application due to multiple calls to XLib threading init function
-rw-r--r--src/kernel/qapplication_x11.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp
index 45d83df..9f89c14 100644
--- a/src/kernel/qapplication_x11.cpp
+++ b/src/kernel/qapplication_x11.cpp
@@ -1646,7 +1646,8 @@ void qt_init_internal( int *argcptr, char **argv,
setlocale( LC_NUMERIC, "C" ); // make sprintf()/scanf() work
#if defined(QT_THREAD_SUPPORT)
- if ( qt_is_gui_used ) {
+ if (( qt_is_gui_used ) && ( !display )) {
+ // If Qt is running standalone with a GUI, initialize X11 threading
XInitThreads();
}
#endif