stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5e06cd7daf103dbb8659a07b6cc119c66c21508a

commit 5e06cd7daf103dbb8659a07b6cc119c66c21508a
Author: Stefan Schmidt <ste...@osg.samsung.com>
Date:   Tue Dec 6 10:21:50 2016 +0100

    evas: events: fix NULL check on returned value
    
    Continuing the loop if the returned pdata is non-NULL does not make sense.
    What Coverity actually found was that if we have cobj_pdata NULL here we
    would happily deref it the line afterwards and crash.
    
    Guilherme, Bruno if something else was intended here feel free to change it
    again.
    
    CID: 1366822
---
 src/lib/evas/canvas/evas_events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index b95e113..2db8e88 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -3649,7 +3649,7 @@ _efl_canvas_object_pointer_mode_by_device_set(Eo *eo_obj, 
Evas_Object_Protected_
                   cobj_data = efl_data_scope_get(cobj, 
EFL_CANVAS_OBJECT_CLASS);
 
                   cobj_pdata = _evas_object_pointer_data_get(pdata, cobj_data, 
dev);
-                  if (cobj_pdata) continue;
+                  if (!cobj_pdata) continue;
                   if (!cobj_pdata->mouse_grabbed) continue;
                   cobj_pdata->mouse_grabbed -= addgrab;
                   pdata->mouse_grabbed -= addgrab;

-- 


Reply via email to