jypark pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=049b397a86f8ebadf9c67c00c691b810f3f32ce2

commit 049b397a86f8ebadf9c67c00c691b810f3f32ce2
Author: Ji-Youn Park <jy0703.p...@samsung.com>
Date:   Fri Jun 26 13:42:56 2015 +0900

    ecore_x_xi2: fix crash if device info is NULL.
    
    _ecore_x_input_device_lookup can return NULL.
    @fix
---
 src/lib/ecore_x/xlib/ecore_x_xi2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/ecore_x/xlib/ecore_x_xi2.c 
b/src/lib/ecore_x/xlib/ecore_x_xi2.c
index 7824817..c59af1f 100644
--- a/src/lib/ecore_x/xlib/ecore_x_xi2.c
+++ b/src/lib/ecore_x/xlib/ecore_x_xi2.c
@@ -657,6 +657,8 @@ _ecore_x_input_handler(XEvent *xevent)
              XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data);
              XIDeviceInfo *dev = _ecore_x_input_device_lookup(evd->deviceid);
 
+             if (!dev) return;
+
              if ((dev->use == XISlavePointer) &&
                  !(evd->flags & XIPointerEmulated))
                {

-- 


Reply via email to