diff options
author | Jiri Hnidek <jiri.hnidek@tul.cz> | 2007-01-23 17:19:28 +0300 |
---|---|---|
committer | Jiri Hnidek <jiri.hnidek@tul.cz> | 2007-01-23 17:19:28 +0300 |
commit | 46d7b91be01531f8cb284da49233029f102339d4 (patch) | |
tree | f8cfcb3005966c185868fbb9a7009ad2b60a162f /source/blender/src/verse_mesh.c | |
parent | 56a4f529fd34d95e6c5965bb5531d494b04d5545 (diff) |
== Verse Bug Fix ==
- several checks for NULL pointer
Diffstat (limited to 'source/blender/src/verse_mesh.c')
-rw-r--r-- | source/blender/src/verse_mesh.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/src/verse_mesh.c b/source/blender/src/verse_mesh.c index b28585bf204..0157c1d4567 100644 --- a/source/blender/src/verse_mesh.c +++ b/source/blender/src/verse_mesh.c @@ -1425,8 +1425,8 @@ void create_meshdata_from_geom_node(Mesh *me, VNode *vnode) me->mselect = NULL; } - me->totvert = vert_vlayer->dl.da.count; - me->totface = face_vlayer->dl.da.count; + me->totvert = vert_vlayer ? vert_vlayer->dl.da.count : 0; + me->totface = face_vlayer ? face_vlayer->dl.da.count : 0; me->totselect = 0; CustomData_add_layer(&me->vdata, CD_MVERT, CD_CALLOC, NULL, me->totvert); @@ -1437,7 +1437,7 @@ void create_meshdata_from_geom_node(Mesh *me, VNode *vnode) mface = me->mface; index = 0; - vvert = vert_vlayer->dl.lb.first; + vvert = vert_vlayer ? vert_vlayer->dl.lb.first : NULL; while(vvert) { VECCOPY(mvert->co, vvert->co); VECCOPY(mvert->no, vvert->no); @@ -1449,7 +1449,7 @@ void create_meshdata_from_geom_node(Mesh *me, VNode *vnode) } edges = BLI_edgehash_new(); - vface = face_vlayer->dl.lb.first; + vface = face_vlayer ? face_vlayer->dl.lb.first : NULL; while(vface) { mface->v1 = vface->vvert0->tmp.index; mface->v2 = vface->vvert1->tmp.index; |