[Genlist] Add checking if it is swallowed correctly.
authorTae-Hwan Kim <the81.kim@samsung.com>
Mon, 13 May 2013 07:40:22 +0000 (16:40 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Wed, 12 Jun 2013 04:58:16 +0000 (13:58 +0900)
Change-Id: I8761646481ccf380532045e2f1b4ef8b45f1bb09

src/lib/elm_genlist.c

index 8f2e0e9..7a7fecb 100644 (file)
@@ -1098,7 +1098,14 @@ _item_mode_content_realize(Elm_Gen_Item *it,
              if (ic)
                {
                   res = eina_list_append(res, ic);
-                  edje_object_part_swallow(target, key, ic);
+                  if (!edje_object_part_swallow(target, key, ic))
+                    {
+                       WRN("%s (%p) can not be swallowed into %s",
+                           evas_object_type_get(ic), ic, key);
+                       evas_object_del(ic);
+                       continue;
+
+                    }
                   evas_object_show(ic);
 #if GENLIST_ENTRY_SUPPORT
                   if (it->flipped)
@@ -1402,7 +1409,14 @@ _item_content_realize(Elm_Gen_Item *it,
              if (ic)
                {
                   res = eina_list_append(res, ic);
-                  edje_object_part_swallow(target, key, ic);
+                  if (!edje_object_part_swallow(target, key, ic))
+                    {
+                       WRN("%s (%p) can not be swallowed into %s",
+                           evas_object_type_get(ic), ic, key);
+                       evas_object_del(ic);
+                       continue;
+
+                    }
                   evas_object_show(ic);
 
 #if GENLIST_ENTRY_SUPPORT