cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e58b135e31d636d5c56336c298950779ec2b8ff2

commit e58b135e31d636d5c56336c298950779ec2b8ff2
Author: se.osadchy <se.osad...@samsung.com>
Date:   Fri Mar 6 19:12:57 2015 +0100

    evas: fix bug in the destructor of node in Evas_3D.
    
    Summary: Bug relative with segmentation fault if node isn't mesh_node type.
    
    @fix
    
    Reviewers: cedric, raster, Hermet
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2101
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/evas/canvas/evas_3d_node.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/canvas/evas_3d_node.c 
b/src/lib/evas/canvas/evas_3d_node.c
index 09bffc8..1f69cdc 100644
--- a/src/lib/evas/canvas/evas_3d_node.c
+++ b/src/lib/evas/canvas/evas_3d_node.c
@@ -621,7 +621,12 @@ _node_free(Evas_3D_Object *obj)
         eina_list_free(pd->members);
      }
 
-   if (pd->data.mesh.meshes)
+   if (pd->parent)
+     {
+        eo_do(pd->parent, evas_3d_node_member_del(obj));
+     }
+
+   if (pd->type == EVAS_3D_NODE_TYPE_MESH && pd->data.mesh.meshes)
      {
         Eina_List *l;
         Evas_3D_Mesh *m;
@@ -632,10 +637,10 @@ _node_free(Evas_3D_Object *obj)
           }
 
         eina_list_free(pd->data.mesh.meshes);
-     }
 
-   if (pd->data.mesh.node_meshes)
-     eina_hash_free(pd->data.mesh.node_meshes);
+        if (pd->data.mesh.node_meshes)
+          eina_hash_free(pd->data.mesh.node_meshes);
+     }
 
    if (pd->scenes_root)
      eina_hash_free(pd->scenes_root);

-- 


Reply via email to