From: discomfitor Date: Thu, 3 Nov 2011 05:48:05 +0000 (+0000) Subject: fix crash when object type is null as pointed out by Jeonghyun Yun X-Git-Tag: REL_F_I9500_20120323_1~17^2~1410 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee1a391f91a11ac24f9426032d4962d775725fc7;p=framework%2Fuifw%2Felementary.git fix crash when object type is null as pointed out by Jeonghyun Yun git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@64677 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/els_icon.c b/src/lib/els_icon.c index 914e360..eb123a0 100644 --- a/src/lib/els_icon.c +++ b/src/lib/els_icon.c @@ -214,10 +214,13 @@ _els_smart_icon_size_get(const Evas_Object *obj, int *w, int *h) Smart_Data *sd; int tw, th; int cw, ch; + const char *type; sd = evas_object_smart_data_get(obj); if (!sd) return; - if (!strcmp(evas_object_type_get(sd->obj), "edje")) + type = evas_object_type_get(sd->obj); + if (!type) return; + if (!strcmp(type, "edje")) edje_object_size_min_get(sd->obj, &tw, &th); else evas_object_image_size_get(sd->obj, &tw, &th); @@ -499,13 +502,16 @@ static void _smart_reconfigure(Smart_Data *sd) { Evas_Coord x, y, w, h; + const char *type; if (!sd->obj) return; w = sd->w; h = sd->h; - if (!strcmp(evas_object_type_get(sd->obj), "edje")) + type = evas_object_type_get(sd->obj); + if (!type) return; + if (!strcmp(type, "edje")) { x = sd->x; y = sd->y;