Evas smart: Remove from the list, don't assume we have not other refcounts.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 11 Jun 2012 08:35:07 +0000 (08:35 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 11 Jun 2012 08:35:07 +0000 (08:35 +0000)
Without it, it just assumes the object has no refcounts and deletes the
object by force. It's very bad if you use refcounts, because your refcounts
are gone.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@71936 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_smart.c

index 8aa7deb..b49fa37 100644 (file)
@@ -301,7 +301,10 @@ _evas_object_smart_members_all_del(Evas_Object *obj)
 {
    Evas_Object_Smart *o = (Evas_Object_Smart *)(obj->object_data);
    while (o->contained)
-     evas_object_del((Evas_Object *)(o->contained));
+     {
+        evas_object_smart_member_del(
+              EINA_INLIST_CONTAINER_GET(o->contained, Evas_Object));
+     }
 }
 
 EAPI Evas_Object *