From 0f8bceb894a13a00a2e1fb48c8c0eefaed58d480 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Iv=C3=A1n=20Briano?= Date: Thu, 17 Jun 2010 16:09:23 +0000 Subject: [PATCH] Avoid returning stack trash, thanks nash. SVN revision: 49730 --- src/lib/elm_hover.c | 6 +++--- src/lib/elm_layout.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/elm_hover.c b/src/lib/elm_hover.c index 8e4bb54..57f46c7 100644 --- a/src/lib/elm_hover.c +++ b/src/lib/elm_hover.c @@ -493,7 +493,6 @@ elm_hover_content_unset(Evas_Object *obj, const char *swallow) ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); Subinfo *si; - Evas_Object *content; const Eina_List *l; char buf[1024]; if (!wd) return NULL; @@ -502,15 +501,16 @@ elm_hover_content_unset(Evas_Object *obj, const char *swallow) { if (!strcmp(buf, si->swallow)) { + Evas_Object *content; if (!si->obj) return NULL; content = si->obj; elm_widget_sub_object_del(obj, si->obj); edje_object_part_unswallow(wd->cov, si->obj); si->obj = NULL; - break; + return content; } } - return content; + return NULL; } /** diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c index e13d5e7..5b8da4f 100644 --- a/src/lib/elm_layout.c +++ b/src/lib/elm_layout.c @@ -271,22 +271,22 @@ elm_layout_content_unset(Evas_Object *obj, const char *swallow) ELM_CHECK_WIDTYPE(obj, widtype) NULL; Widget_Data *wd = elm_widget_data_get(obj); Subinfo *si; - Evas_Object *content; const Eina_List *l; if (!wd) return NULL; EINA_LIST_FOREACH(wd->subs, l, si) { if (!strcmp(swallow, si->swallow)) { + Evas_Object *content; if (!si->obj) return NULL; content = si->obj; elm_widget_sub_object_del(obj, si->obj); edje_object_part_unswallow(wd->lay, si->obj); si->obj = NULL; - break; + return content; } } - return content; + return NULL; } /** -- 2.7.4