* evas: Fix SEGV when smart object's child come from another layer than
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 15 Jun 2009 14:25:21 +0000 (14:25 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 15 Jun 2009 14:25:21 +0000 (14:25 +0000)
commit90e7fc56e3743eeb0104b7a1e7b2008044bb3a3a
tree91e677f5385f5d823329153fddc638caec613bc1
parent3d6a6769dfa9f8f028bd270b8249c4ac20c1c8d4
* evas: Fix SEGV when smart object's child come from another layer than
the parent.

When we insert object inside a smart object, they could be attached to
another layer. As long as ref counting work, nothing wrong will happen.
But during destruction of an Evas, we were just looping over all layers,
destroying each of them, without checking for refcounting. This could
cause SEGV.
      This patch introduce a third loop for wiping out all layers after
destroying all Evas_Object. So no more SEGV, and no performance
regression.

Note: Do not rely on evas_object_layer_get on smart object's child, it
could give you the wrong answer.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@41046 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
src/lib/canvas/evas_layer.c
src/lib/canvas/evas_main.c
src/lib/include/evas_private.h