summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2018-04-09 10:12:58 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-04-09 10:36:43 -0700
commit982ad90f573b8754cdc7ac746cd8ba9ca8e9a3d9 (patch)
treecda6cbe2921d1b862c67eb4d58ee5af4eb308fd8
parent0f06f222ba8fc0ba7d06ee3d89552c05fa2aa4b8 (diff)
evas: add null check
Summary: this commit add null check. In EVAS_OBJECT_DATA_SAFE_GET, if eo_obj is null, obj can also be null. and In _efl_canvas_output_async_block() can return null. Test Plan: N/A Reviewers: woohyun, kimcinoo, cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5870 Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/evas/canvas/evas_object_main.c1
-rw-r--r--src/lib/evas/canvas/evas_out.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index a06397003a..350db6bb8d 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -189,6 +189,7 @@ _animation_intercept_hide(void *data, Evas_Object *eo_obj)
189{ 189{
190 Event_Animation *event_anim = data; 190 Event_Animation *event_anim = data;
191 Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj); 191 Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
192 if (!obj) return;
192 193
193 if (event_anim->anim && obj->anim_player && 194 if (event_anim->anim && obj->anim_player &&
194 (event_anim->anim != efl_animation_player_animation_get(obj->anim_player))) 195 (event_anim->anim != efl_animation_player_animation_get(obj->anim_player)))
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index 2c44b0868f..a1a35a1276 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -53,6 +53,7 @@ efl_canvas_output_add(Evas *canvas)
53 r->changed = EINA_TRUE; 53 r->changed = EINA_TRUE;
54 54
55 e = _efl_canvas_output_async_block(r); 55 e = _efl_canvas_output_async_block(r);
56 if (!e) return NULL;
56 // Track this output in Evas 57 // Track this output in Evas
57 e->outputs = eina_list_append(e->outputs, r); 58 e->outputs = eina_list_append(e->outputs, r);
58 59