Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2007-11-14 19:20:19 +0300
committerTon Roosendaal <ton@blender.org>2007-11-14 19:20:19 +0300
commitfa8032ce3180ec0fc4346c8d08e427d1c1b1cfdc (patch)
treeaf6ef900ac0ebb8e06c549cdda20bdf745ffb3e1 /source/blender/blenloader
parent0ca299439c705f6b692b038069c227ad8d16688f (diff)
Bugfix in MeshDeform file reading, should check for NULL pointer case...
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 3cb615bb74b..75c746f7213 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2901,12 +2901,15 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
if(fd->flags & FD_FLAGS_SWITCH_ENDIAN) {
int a;
- for(a=0; a<mmd->totcagevert*mmd->totvert; a++)
- SWITCH_INT(mmd->bindweights[a])
- for(a=0; a<mmd->totcagevert*3; a++)
- SWITCH_INT(mmd->bindcos[a])
- for(a=0; a<mmd->totvert; a++)
- SWITCH_INT(mmd->dynverts[a])
+ if(mmd->bindweights)
+ for(a=0; a<mmd->totcagevert*mmd->totvert; a++)
+ SWITCH_INT(mmd->bindweights[a])
+ if(mmd->bindcos)
+ for(a=0; a<mmd->totcagevert*3; a++)
+ SWITCH_INT(mmd->bindcos[a])
+ if(mmd->dynverts)
+ for(a=0; a<mmd->totvert; a++)
+ SWITCH_INT(mmd->dynverts[a])
}
}
}