From ec8d1b496cd3b379ed4da22de194833034b64ce5 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 20 Nov 2006 19:03:37 +0000 Subject: [PATCH] Fix for a missing check for NULL face data in test_index_face in my previous commit. --- source/blender/blenkernel/intern/mesh.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 43eb77ec867..2da2e884032 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -564,7 +564,8 @@ void test_index_face(MFace *mface, CustomData *fdata, int mfindex, int nr) SWAP(int, mface->v1, mface->v2); SWAP(int, mface->v2, mface->v3); - CustomData_swap(fdata, mfindex, corner_indices); + if(fdata) + CustomData_swap(fdata, mfindex, corner_indices); } } else if(nr==4) { @@ -574,7 +575,8 @@ void test_index_face(MFace *mface, CustomData *fdata, int mfindex, int nr) SWAP(int, mface->v1, mface->v3); SWAP(int, mface->v2, mface->v4); - CustomData_swap(fdata, mfindex, corner_indices); + if(fdata) + CustomData_swap(fdata, mfindex, corner_indices); } } }