discomfitor pushed a commit to branch master.
commit 7dfd4581b424f9b8f30596286e03764fa2738572
Author: Mike Blumenkrantz <[email protected]>
Date: Thu Jul 11 11:39:46 2013 +0100
fix crash when trying to get an object below the current object and a layer
with no objects is present
probably a layer not being cleaned somewhere, but I can't deal with the
crashing
---
src/lib/evas/canvas/evas_stack.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/lib/evas/canvas/evas_stack.c b/src/lib/evas/canvas/evas_stack.c
index e8b626b..313e411 100644
--- a/src/lib/evas/canvas/evas_stack.c
+++ b/src/lib/evas/canvas/evas_stack.c
@@ -26,12 +26,12 @@ evas_object_below_get_internal(const
Evas_Object_Protected_Data *obj)
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->prev);
else
{
- if ((EINA_INLIST_GET(obj->layer))->prev)
- {
- Evas_Layer *l;
+ Evas_Layer *l = (Evas_Layer *)(EINA_INLIST_GET(obj->layer))->prev;
- l = (Evas_Layer *)((EINA_INLIST_GET(obj->layer))->prev);
- return (Evas_Object_Protected_Data
*)((EINA_INLIST_GET((l->objects)))->last);
+ for (; l; l = (Evas_Layer *)(EINA_INLIST_GET(l))->prev)
+ {
+ if (l->objects)
+ return (Evas_Object_Protected_Data
*)((EINA_INLIST_GET((l->objects)))->last);
}
}
return NULL;
--
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk