raster pushed a commit to branch master.
commit 8cf7e6174423aca6764581cccda5fb921f8123a6
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date: Fri Apr 26 16:28:27 2013 +0900
protect against failure to find a container layer win in comp
it may happen that a container layer window cannot be found (someone
deleted it other than e - which is possible), and e hasn't expected
this. comp will have removed the comp win entry but containers will
not know. this is either some client being stupid, or malicious, but
protect against it, complain with an ERR and march on so we don't crash.
---
src/bin/e_comp.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index 4ced3ce..cde8c6c 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -5388,10 +5388,18 @@ e_comp_canvas_layer_set(Evas_Object *obj,
E_Comp_Canvas_Layer comp_layer, E_Laye
con = eina_list_data_get(c->man->containers);
cwn = e_comp_win_find(con->layers[0].win);
- cwn->stack_below = eina_list_append(cwn->stack_below, cw);
- cw->cw_above = cwn;
- c->wins = eina_inlist_remove(c->wins, EINA_INLIST_GET(cw));
- c->wins = eina_inlist_prepend_relative(c->wins,
EINA_INLIST_GET(cw), EINA_INLIST_GET(cwn));
+ if (!cwn)
+ {
+ ERR("Major error. Cannot find container layer 0 window
marker");
+ c->wins = eina_inlist_prepend(c->wins, EINA_INLIST_GET(cw));
+ }
+ else
+ {
+ cwn->stack_below = eina_list_append(cwn->stack_below, cw);
+ cw->cw_above = cwn;
+ c->wins = eina_inlist_remove(c->wins, EINA_INLIST_GET(cw));
+ c->wins = eina_inlist_prepend_relative(c->wins,
EINA_INLIST_GET(cw), EINA_INLIST_GET(cwn));
+ }
}
}
if (stack == E_COMP_CANVAS_STACK_ABOVE)
--
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr