edje: cast the right type.
authorcedric <cedric>
Wed, 25 Jan 2012 09:53:38 +0000 (09:53 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 25 Jan 2012 09:53:38 +0000 (09:53 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@67527 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/edje_cc_handlers.c

index c853053..9abd39f 100644 (file)
@@ -833,6 +833,20 @@ _edje_part_description_fill(Edje_Part_Description_Spec_Fill *fill)
    fill->type = EDJE_FILL_TYPE_SCALE;
 }
 
+static void
+_edje_part_description_image_remove(Edje_Part_Description_Image *ed)
+{
+   unsigned int j;
+
+   if (!ed) return;
+
+   data_queue_image_remove(&(ed->image.id), &(ed->image.set));
+
+   for (j = 0; j < ed->image.tweens_count; ++j)
+     data_queue_image_remove(&(ed->image.tweens[j]->id),
+                             &(ed->image.tweens[j]->set));
+}
+
 static Edje_Part_Description_Common *
 _edje_part_description_alloc(unsigned char type, const char *collection, const char *part)
 {
@@ -2173,13 +2187,14 @@ st_collections_group_name(void)
              if (pc->parts[i]->type != EDJE_PART_TYPE_IMAGE)
                continue ;
 
-             ed = (Edje_Part_Description_Image*) &pc->parts[i];
-
-             data_queue_image_remove(&(ed->image.id), &(ed->image.set));
+             ed = (Edje_Part_Description_Image*) pc->parts[i]->default_desc;
+            _edje_part_description_image_remove(ed);
 
-             for (j = 0; j < ed->image.tweens_count; ++j)
-               data_queue_image_remove(&(ed->image.tweens[ed->image.tweens_count - 1]->id),
-                                       &(ed->image.tweens[ed->image.tweens_count - 1]->set));
+            for (j = 0; j < pc->parts[i]->other.desc_count; j++)
+               {
+                  ed = (Edje_Part_Description_Image*) pc->parts[i]->other.desc[j];
+                  _edje_part_description_image_remove(ed);
+               }
          }
 
        EINA_LIST_FOREACH(edje_collections, l, pc)