From 2f4d209181adb49222f5da4446f3e41d1c28dc50 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Thu, 5 Mar 2020 08:28:05 -0500 Subject: [PATCH] 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 Differential Revision: https://phab.enlightenment.org/D11450 --- src/lib/evas/canvas/evas_object_intercept.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_intercept.c b/src/lib/evas/canvas/evas_object_intercept.c index 298a76c74a..325359176c 100644 --- a/src/lib/evas/canvas/evas_object_intercept.c +++ b/src/lib/evas/canvas/evas_object_intercept.c @@ -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; \