diff options
author | Hermet Park <chuneon.park@samsung.com> | 2020-04-24 21:11:27 +0900 |
---|---|---|
committer | Hermet Park <chuneon.park@samsung.com> | 2020-04-24 21:11:27 +0900 |
commit | ed9ab21fdf9352b538d2ed4a2afac8644b611163 (patch) | |
tree | 8b1bf2c30fb7b1f43555fb4f4c2b5d0eda420628 | |
parent | 052f562c42a9ad1393e13a2f61e69015f113ee52 (diff) | |
download | efl-ed9ab21fdf9352b538d2ed4a2afac8644b611163.tar.gz |
canvas layer: +prevent null layer objects.
-rw-r--r-- | src/lib/evas/canvas/evas_stack.x | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/lib/evas/canvas/evas_stack.x b/src/lib/evas/canvas/evas_stack.x index 333932f4bd..ddd3dffbcb 100644 --- a/src/lib/evas/canvas/evas_stack.x +++ b/src/lib/evas/canvas/evas_stack.x @@ -402,18 +402,20 @@ _evas_canvas_object_top_get(const Eo *eo_e EINA_UNUSED, Evas_Public_Data *e) //just in case if layer has no valid objects in the list. EINA_INLIST_REVERSE_FOREACH(list, layer) - if (layer->objects) break; + { + if (!layer->objects) continue; - list = EINA_INLIST_GET(layer->objects); - if (!list) return NULL; + list = EINA_INLIST_GET(layer->objects); + if (!list) return NULL; - obj = (Evas_Object_Protected_Data *) list->last; - if (!obj) return NULL; + obj = (Evas_Object_Protected_Data *) list->last; + if (!obj) return NULL; - while (obj) - { - if (!obj->delete_me) return obj->object; - obj = evas_object_below_get_internal(obj); + while (obj) + { + if (!obj->delete_me) return obj->object; + obj = evas_object_below_get_internal(obj); + } } return NULL; |