diff options
author | Ton Roosendaal <ton@blender.org> | 2009-04-22 21:35:37 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-04-22 21:35:37 +0400 |
commit | b22819f686539f75438938ed45751e7dc3405a0c (patch) | |
tree | 5d9f19b15e635d15a2930ba0758442a5715038d9 /source | |
parent | 971cabc2d687c86b8ff1e7a5a57474d85450b170 (diff) |
Bugfix #18039
Armature modifier didn't set amd->prevCos temp variable to NULL
after freeing. Saving this in file will cause error or crash on
reading. Quite weird how it survived so long?
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 4 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 7977e7b0160..f7620f5b88c 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -8846,8 +8846,10 @@ void modifier_freeTemporaryData(ModifierData *md) if(md->type == eModifierType_Armature) { ArmatureModifierData *amd= (ArmatureModifierData*)md; - if(amd->prevCos) + if(amd->prevCos) { MEM_freeN(amd->prevCos); + amd->prevCos= NULL; + } } } diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 477f5a6cb59..ce154755651 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3176,6 +3176,11 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) smd->emCache = smd->mCache = 0; } + else if (md->type==eModifierType_Armature) { + ArmatureModifierData *amd = (ArmatureModifierData*) md; + + amd->prevCos= NULL; + } else if (md->type==eModifierType_Cloth) { ClothModifierData *clmd = (ClothModifierData*) md; |