Fixed crash when VNCing and trying to use non-present XFixes extension.

Task-number: QTBUG-29978
Change-Id: I1a6759bafaac7a1d2b598412f0d32077a42192a4
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
Mitch Curtis 2013-03-14 12:48:35 +01:00 committed by The Qt Project
parent 958b621ba2
commit 40236c35a6

View File

@ -482,7 +482,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0);
}
if (cursor && cshape >= 0 && cshape < Qt::LastCursor) {
if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) {
const char *name = cursorNames[cshape];
xcb_xfixes_set_cursor_name(conn, cursor, strlen(name), name);
}