Edje: delete real part object after swallows got handled
authorLeandro Dorileo <dorileo@profusion.mobi>
Wed, 19 Dec 2012 20:09:41 +0000 (20:09 +0000)
committerLeandro Dorileo <dorileo@profusion.mobi>
Wed, 19 Dec 2012 20:09:41 +0000 (20:09 +0000)
Case the real part object(rp->object) is an smart object it start to delete
the whole smart object hierarchy and a child object may be a swallow of this
real part. So just delete the rp->object after swallows got handled.

SVN revision: 81403

legacy/edje/src/lib/edje_load.c

index a2d4fb3..a11d11d 100644 (file)
@@ -1314,12 +1314,7 @@ _edje_file_del(Edje *ed)
 
             if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
               _edje_entry_real_part_shutdown(rp);
-            if (rp->object)
-              {
-                 _edje_callbacks_del(rp->object, ed);
-                 _edje_callbacks_focus_del(rp->object, ed);
-                 evas_object_del(rp->object);
-              }
+
              if ((rp->type == EDJE_RP_TYPE_CONTAINER) &&
                  (rp->typedata.container))
                {
@@ -1368,6 +1363,13 @@ _edje_file_del(Edje *ed)
                   free(rp->typedata.swallow);
                }
 
+            if (rp->object)
+              {
+                 _edje_callbacks_del(rp->object, ed);
+                 _edje_callbacks_focus_del(rp->object, ed);
+                 evas_object_del(rp->object);
+              }
+
             if (rp->custom)
                {
                   // xxx: lua2