forked from enlightenment/efl
evas_object_intercept: Add check for NULL 'obj' variable inside macros
This patch adds a small check for a valid 'obj' variable inside the object_intercept macros, which fixes several Coverity reported issues of NULL pointer dereference. Fixes CID1420239 through CID1420258
This commit is contained in:
parent
dceb056a66
commit
7c99e0a444
|
@ -264,7 +264,7 @@ _evas_object_intercept_call_evas(Evas_Object_Protected_Data *obj,
|
|||
return; \
|
||||
MAGIC_CHECK_END(); \
|
||||
Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); \
|
||||
if (!func) return; \
|
||||
if ((!obj) || (!func) return; \
|
||||
evas_object_intercept_init(obj); \
|
||||
if (!obj->interceptors) return; \
|
||||
obj->interceptors->Lower_Type.func = func; \
|
||||
|
@ -281,7 +281,7 @@ _evas_object_intercept_call_evas(Evas_Object_Protected_Data *obj,
|
|||
return NULL; \
|
||||
MAGIC_CHECK_END(); \
|
||||
Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); \
|
||||
if (!func) return NULL; \
|
||||
if ((!obj) || (!func)) return NULL; \
|
||||
if (!obj->interceptors) return NULL; \
|
||||
obj->interceptors->Lower_Type.func = NULL; \
|
||||
data = obj->interceptors->Lower_Type.data; \
|
||||
|
|
Loading…
Reference in New Issue