From 8cfa8aaa874eb7b8502d39dd21238dd393c079f1 Mon Sep 17 00:00:00 2001 From: sachiel Date: Thu, 7 Oct 2010 14:45:57 +0000 Subject: [PATCH] Cheking if start.layout is set before using it. When evas_object_show is called with a elm_layout object before resizing it the layout function is called before edje calc function, so the start layout is not yet set. By: Otavio Pontes git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@53144 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/edje_box_layout.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/edje_box_layout.c b/src/lib/edje_box_layout.c index 10a2020..5a30c1d 100644 --- a/src/lib/edje_box_layout.c +++ b/src/lib/edje_box_layout.c @@ -99,9 +99,12 @@ _edje_box_layout(Evas_Object *obj, Evas_Object_Box_Data *priv, void *data) Edje_Part_Box_Animation *anim = data; if (anim->progress < 0.01) { - evas_object_box_padding_set(obj, anim->start.padding.x, anim->start.padding.y); - evas_object_box_align_set(obj, TO_DOUBLE(anim->start.align.x), TO_DOUBLE(anim->start.align.y)); - anim->start.layout(obj, priv, anim->start.data); + if (anim->start.layout) + { + evas_object_box_padding_set(obj, anim->start.padding.x, anim->start.padding.y); + evas_object_box_align_set(obj, TO_DOUBLE(anim->start.align.x), TO_DOUBLE(anim->start.align.y)); + anim->start.layout(obj, priv, anim->start.data); + } return; } -- 2.7.4