From 3062ff4402fddb08b632b67549387acbfe89d5df Mon Sep 17 00:00:00 2001 From: shilpa singh Date: Mon, 27 Dec 2010 17:08:00 +0530 Subject: [PATCH] elm_navigationbar - prevent issues elm_toolbar - prevent issues --- src/lib/elm_navigationbar.c | 4 ++-- src/lib/elm_toolbar.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/elm_navigationbar.c b/src/lib/elm_navigationbar.c index 666723d..3f87774 100644 --- a/src/lib/elm_navigationbar.c +++ b/src/lib/elm_navigationbar.c @@ -180,12 +180,11 @@ _sizing_eval(Evas_Object *obj) static void _item_sizing_eval(Item *it) { + if (!it) return; Widget_Data *wd = elm_widget_data_get(it->obj); Evas_Coord pad, height, minw, w; int pad_count = 2; - if (!it) return; - edje_object_size_min_calc(wd->base, &minw, NULL); evas_object_geometry_get(wd->base, NULL, NULL, &w, NULL); if (w < minw) w = minw; @@ -882,6 +881,7 @@ elm_navigationbar_title_object_list_unset(Evas_Object *obj, Evas_Object *content { ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return; Eina_List *ll; Item *it; Item *last_it = NULL; diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c index 9a3d381..90afe12 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -837,9 +837,10 @@ elm_toolbar_align_get(const Evas_Object *obj) EAPI void elm_toolbar_item_menu_set(Elm_Toolbar_Item *item, Eina_Bool menu) { + if(!item) return; Widget_Data *wd = elm_widget_data_get(item->obj); - if ((!wd) || (!item)) return; + if (!wd) return; if (item->menu == menu) return; item->menu = menu; if (menu) -- 2.7.4