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
This commit is contained in:
Stefan Schmidt 2016-12-06 10:21:50 +01:00
parent c32c5dd222
commit 5e06cd7daf
1 changed files with 1 additions and 1 deletions

View File

@ -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;