summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <chuneon.park@samsung.com>2020-04-24 21:11:27 +0900
committerHermet Park <chuneon.park@samsung.com>2020-04-24 21:11:27 +0900
commited9ab21fdf9352b538d2ed4a2afac8644b611163 (patch)
tree8b1bf2c30fb7b1f43555fb4f4c2b5d0eda420628
parent052f562c42a9ad1393e13a2f61e69015f113ee52 (diff)
canvas layer: +prevent null layer objects.
-rw-r--r--src/lib/evas/canvas/evas_stack.x20
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)
402 402
403 //just in case if layer has no valid objects in the list. 403 //just in case if layer has no valid objects in the list.
404 EINA_INLIST_REVERSE_FOREACH(list, layer) 404 EINA_INLIST_REVERSE_FOREACH(list, layer)
405 if (layer->objects) break; 405 {
406 if (!layer->objects) continue;
406 407
407 list = EINA_INLIST_GET(layer->objects); 408 list = EINA_INLIST_GET(layer->objects);
408 if (!list) return NULL; 409 if (!list) return NULL;
409 410
410 obj = (Evas_Object_Protected_Data *) list->last; 411 obj = (Evas_Object_Protected_Data *) list->last;
411 if (!obj) return NULL; 412 if (!obj) return NULL;
412 413
413 while (obj) 414 while (obj)
414 { 415 {
415 if (!obj->delete_me) return obj->object; 416 if (!obj->delete_me) return obj->object;
416 obj = evas_object_below_get_internal(obj); 417 obj = evas_object_below_get_internal(obj);
418 }
417 } 419 }
418 420
419 return NULL; 421 return NULL;