Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-01-17 06:06:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-17 06:06:54 +0400
commit60e558393321edf4c8a41376c600981ae8636d24 (patch)
tree9e6735c24248561f9b29c27f9a6bb223ad451899 /intern
parent86d4786305613a2639db135e56f800653eefe288 (diff)
add NULL check for XInput device, since its possible only one is valid.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index de6a1142492..946f45af76f 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -521,9 +521,15 @@ static void setTabletMode(GHOST_SystemX11 *system, GHOST_WindowX11 *window, XID
#ifdef WITH_X11_XINPUT
static bool checkTabletProximity(Display *display, XDevice *device)
{
+ /* we could have true/false/not-found return value, but for now false is OK */
+
/* see: state.c from xinput, to get more data out of the device */
XDeviceState *state;
+ if (device == NULL) {
+ return false;
+ }
+
state = XQueryDeviceState(display, device);
if (state) {