cedric pushed a commit to branch master.

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

commit 095bab1723d5ba04a002ab953623949d5f59a3ea
Author: Dmytro Dadyka <d.dad...@samsung.com>
Date:   Fri Feb 20 18:40:11 2015 +0100

    evas: Evas_3D - fix bug with pack meshes data.
    
    Reviewers: cedric
    
    @fix
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2015
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/evas/canvas/evas_3d_node.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_3d_node.c 
b/src/lib/evas/canvas/evas_3d_node.c
index 41298f5..84f6204 100644
--- a/src/lib/evas/canvas/evas_3d_node.c
+++ b/src/lib/evas/canvas/evas_3d_node.c
@@ -432,7 +432,9 @@ _pack_meshes_vertex_data(Evas_3D_Node *node, Evas_Vec3 
**vertices, int *count)
         eo_do(node, frame = evas_3d_node_mesh_frame_get(mesh));
         mpd = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS);
         f = evas_3d_mesh_frame_find(mpd, frame);
-        if (f) *count += mpd->vertex_count;
+        if (f)
+          if (f->vertices[EVAS_3D_VERTEX_POSITION].data)
+            *count += mpd->vertex_count;
      }
 
    *vertices = (Evas_Vec3*)malloc(*count * sizeof(Evas_Vec3));
@@ -451,6 +453,7 @@ _pack_meshes_vertex_data(Evas_3D_Node *node, Evas_Vec3 
**vertices, int *count)
         if (f)
           {
              float *src = (float *)f->vertices[EVAS_3D_VERTEX_POSITION].data;
+             if (!src) continue;
              int stride = f->vertices[EVAS_3D_VERTEX_POSITION].stride;
              if (!stride) stride = sizeof(float) * 3;
              for (j = 0; j < mpd->vertex_count; j++)

-- 


Reply via email to