From: Enlightenment S. <no-...@en...> - 2011-12-05 02:57:47
|
Log: fix an infinite recursion bug and related crash in elm_box_recalculate Author: discomfitor Date: 2011-12-04 18:57:40 -0800 (Sun, 04 Dec 2011) New Revision: 65880 Trac: http://trac.enlightenment.org/e/changeset/65880 Modified: trunk/elementary/src/lib/elm_box.c Modified: trunk/elementary/src/lib/elm_box.c =================================================================== --- trunk/elementary/src/lib/elm_box.c 2011-12-05 01:14:59 UTC (rev 65879) +++ trunk/elementary/src/lib/elm_box.c 2011-12-05 02:57:40 UTC (rev 65880) @@ -20,6 +20,7 @@ Evas_Object *box; Eina_Bool horizontal:1; Eina_Bool homogeneous:1; + Eina_Bool recalc:1; }; struct _Elm_Box_Transition @@ -674,7 +675,9 @@ { ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return; + if ((!wd) || (wd->recalc)) return; evas_object_smart_need_recalculate_set(wd->box, EINA_TRUE); + wd->recalc++; evas_object_smart_calculate(wd->box); + wd->recalc--; } |