From: Jerome St-Louis Date: Wed, 12 Feb 2014 03:00:36 +0000 (+0700) Subject: ecere/gui/drivers/XInterface: Fixed X errors caused by calling XDefineCursor on a... X-Git-Tag: 0.44.09.9~62 X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?p=sdk;a=commitdiff_plain;h=f1c5e0d64a71076cd01f3c97025e8b40d8ff7110 ecere/gui/drivers/XInterface: Fixed X errors caused by calling XDefineCursor on a null window handle --- diff --git a/ecere/src/gui/drivers/XInterface.ec b/ecere/src/gui/drivers/XInterface.ec index 7c92fac..c7843de 100644 --- a/ecere/src/gui/drivers/XInterface.ec +++ b/ecere/src/gui/drivers/XInterface.ec @@ -3007,8 +3007,9 @@ class XInterface : Interface void SetMouseCursor(Window window, int cursor) { - XDefineCursor(xGlobalDisplay, (X11Window) window.rootWindow.windowHandle, - cursor == -1 ? (X11Cursor)0 : systemCursors[(SystemCursor)cursor]); + if(window.rootWindow.windowHandle) + XDefineCursor(xGlobalDisplay, (X11Window) window.rootWindow.windowHandle, + cursor == -1 ? (X11Cursor)0 : systemCursors[(SystemCursor)cursor]); } // --- Caret ---