diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-10 15:51:18 -0600 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-06-02 20:29:55 +0200 |
commit | 8969326a1645e5bce6045882e6b83546b054a9c1 (patch) | |
tree | 9a1ff6c261065bd8f87ed305c492ab14ca540198 | |
parent | d0c6decc228d7ab0d42d00d515b2f4571452abd5 (diff) | |
download | qt3-8969326a1645e5bce6045882e6b83546b054a9c1.tar.gz qt3-8969326a1645e5bce6045882e6b83546b054a9c1.zip |
Fix potential crash when Qt3 is used as part of another application due to multiple calls to XLib threading init function
(cherry picked from commit 1db4f237a710955a817c7aca65a716d85573304b)
-rw-r--r-- | src/kernel/qapplication_x11.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index f8dd445..c2bb456 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -1633,7 +1633,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 |