diff options
author | David Faure <david.faure@kdab.com> | 2012-02-09 17:35:15 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-10 08:49:08 (GMT) |
commit | 29ec5ba68a14b8c75876ce129dd7b3204f8ba503 (patch) | |
tree | 3818cf3bf7e240f18e8087889092541ad9fd925b /src | |
parent | 42004eccf246cbc110f0ad22caa85efeeeb640bb (diff) | |
download | Qt-29ec5ba68a14b8c75876ce129dd7b3204f8ba503.zip Qt-29ec5ba68a14b8c75876ce129dd7b3204f8ba503.tar.gz Qt-29ec5ba68a14b8c75876ce129dd7b3204f8ba503.tar.bz2 |
Fix crash in qt_init when the XFIXES extension is not available.
This happened to me when starting a Qt4 application in VNC
(vncserver, vncviewer -via host, on linux).
The pointers to the xfixes functions were not being set to 0 when
XFIXES is not available, so it would crash later on in the method,
in the (null-checked) use of X11->ptrXFixesSelectSelectionInput.
Change-Id: Icbeec16e211790ea9d8ebe7e2d96c7a8021214cd
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index d4782f9..256db7d 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -2082,6 +2082,14 @@ void qt_init(QApplicationPrivate *priv, int, X11->use_xfixes = (major >= 1); X11->xfixes_major = major; } + } else { + X11->ptrXFixesQueryExtension = 0; + X11->ptrXFixesQueryVersion = 0; + X11->ptrXFixesSetCursorName = 0; + X11->ptrXFixesSelectSelectionInput = 0; + X11->ptrXFixesCreateRegionFromWindow = 0; + X11->ptrXFixesFetchRegion = 0; + X11->ptrXFixesDestroyRegion = 0; } #endif // QT_NO_XFIXES |