summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <chuneon.park@samsung.com>2020-03-03 19:17:29 +0900
committerHermet Park <chuneon.park@samsung.com>2020-03-03 19:18:00 +0900
commit146cf9da7e917d1d9e282a7378258d98610057d0 (patch)
tree7b21f06cbfd7194ccdefd4f836fd801c32bf29ee
parent120c0e4032cd1239d17f76f4dd60692cb6f72b5f (diff)
evas: ++safety by prevent invalid accesses.
-rw-r--r--src/lib/evas/canvas/evas_object_intercept.c4
1 files 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 9911a5b1f3..fd904f7708 100644
--- a/src/lib/evas/canvas/evas_object_intercept.c
+++ b/src/lib/evas/canvas/evas_object_intercept.c
@@ -16,7 +16,7 @@ static void
16evas_object_intercept_init(Evas_Object *eo_obj) 16evas_object_intercept_init(Evas_Object *eo_obj)
17{ 17{
18 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 18 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
19 if (!obj->interceptors) 19 if (!obj || !obj->interceptors)
20 obj->interceptors = calloc(1, sizeof(Evas_Intercept_Func)); 20 obj->interceptors = calloc(1, sizeof(Evas_Intercept_Func));
21} 21}
22 22
@@ -24,7 +24,7 @@ static void
24evas_object_intercept_deinit(Evas_Object *eo_obj) 24evas_object_intercept_deinit(Evas_Object *eo_obj)
25{ 25{
26 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 26 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
27 if (!obj->interceptors) return; 27 if (!obj || !obj->interceptors) return;
28 if ((obj->interceptors->show.func) || 28 if ((obj->interceptors->show.func) ||
29 (obj->interceptors->hide.func) || 29 (obj->interceptors->hide.func) ||
30 (obj->interceptors->move.func) || 30 (obj->interceptors->move.func) ||