Els_icon: add null check code for H0100121203
authorJiyoun Park <jy0703.park@samsung.com>
Thu, 24 Mar 2011 08:18:06 +0000 (17:18 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Thu, 24 Mar 2011 08:18:06 +0000 (17:18 +0900)
Change-Id: Ie156d1281d1bbcae3de7b937cecea083549d22d2

src/lib/els_icon.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index daa0373..ac2959e
@@ -167,7 +167,9 @@ _els_smart_icon_size_get(const Evas_Object *obj, int *w, int *h)
 
    sd = evas_object_smart_data_get(obj);
    if (!sd) return;
-   if (!strcmp(evas_object_type_get(sd->obj), "edje"))
+
+   const char *type = evas_object_type_get(sd->obj);
+   if ((type) && !strcmp(type, "edje"))
      edje_object_size_min_get(sd->obj, &tw, &th);
    else
      evas_object_image_size_get(sd->obj, &tw, &th);
@@ -424,7 +426,9 @@ _smart_reconfigure(Smart_Data *sd)
    Evas_Coord x, y, w, h;
 
    if (!sd->obj) return;
-   if (!strcmp(evas_object_type_get(sd->obj), "edje"))
+
+   const char *type = evas_object_type_get(sd->obj);
+   if ((type) && !strcmp(type, "edje"))
      {
        w = sd->w;
        h = sd->h;