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?
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user