From: Mike Blumenkrantz Date: Fri, 23 Jun 2017 21:43:58 +0000 (-0400) Subject: evas: check object layer existence before deref to avoid crash X-Git-Tag: upstream/1.20.0~440 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c8dae5720327dad5a964036df01af16ff8f63a7;p=platform%2Fupstream%2Fefl.git evas: check object layer existence before deref to avoid crash @fix --- diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 0e3fcd9..c142107 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -366,7 +366,9 @@ _efl_canvas_group_group_member_del(Eo *smart_obj, Evas_Smart_Data *_pd EINA_UNUS // Layer usage shouldn't reach 0 here (as parent is still in layer) obj->layer->usage--; } - evas_object_inject(eo_obj, obj, obj->layer->evas->evas); + /* layer may be destroyed in evas_object_release() call */ + if (obj->layer) + evas_object_inject(eo_obj, obj, obj->layer->evas->evas); obj->restack = 1; evas_object_change(eo_obj, obj); evas_object_mapped_clip_across_mark(eo_obj, obj);