forked from enlightenment/efl
evas_object_intercept: Use efl_data_scope_safe_get
As per mailing list discussion, This macro is apparently a forward facing API so we should be using efl_data_scope_safe_get in the event that the API receives an object of the wrong type (which would have caused a crash previously). Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11450
This commit is contained in:
parent
5e23d3983a
commit
2f4d209181
|
@ -263,7 +263,7 @@ _evas_object_intercept_call_evas(Evas_Object_Protected_Data *obj,
|
|||
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); \
|
||||
return; \
|
||||
MAGIC_CHECK_END(); \
|
||||
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); \
|
||||
Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); \
|
||||
if (!func) return; \
|
||||
evas_object_intercept_init(obj); \
|
||||
if (!obj->interceptors) return; \
|
||||
|
@ -280,7 +280,7 @@ _evas_object_intercept_call_evas(Evas_Object_Protected_Data *obj,
|
|||
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); \
|
||||
return NULL; \
|
||||
MAGIC_CHECK_END(); \
|
||||
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); \
|
||||
Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); \
|
||||
if (!func) return NULL; \
|
||||
if (!obj->interceptors) return NULL; \
|
||||
obj->interceptors->Lower_Type.func = NULL; \
|
||||
|
|
Loading…
Reference in New Issue