summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-11-10 11:56:23 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-11-10 12:40:37 (GMT)
commit2a0c11e13ff1cba30f3be324dadd14f8d0a1baa6 (patch)
tree036b74adb61711562cf9052584c7fb3721f90ee0
parent7429ff911e05c05fbdd986a5932545571ee4beef (diff)
downloadQt-2a0c11e13ff1cba30f3be324dadd14f8d0a1baa6.zip
Qt-2a0c11e13ff1cba30f3be324dadd14f8d0a1baa6.tar.gz
Qt-2a0c11e13ff1cba30f3be324dadd14f8d0a1baa6.tar.bz2
PlatformPlugin: Do not load the plugin if there is no GUI
Otherwise valgrind might complain we use uninitialized value (when using the X11 structure) Reviewed-by: Gabriel
-rw-r--r--src/gui/kernel/qapplication.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 987aa26..4b8f6a0 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -791,7 +791,8 @@ void QApplicationPrivate::construct(
}
//make sure the plugin is loaded
- qt_guiPlatformPlugin();
+ if (qt_is_gui_used)
+ qt_guiPlatformPlugin();
#endif
}