From 13f1ce8bdcef148adbed4749c7dd8f6a3e37f474 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Tue, 25 May 2010 15:26:12 +0000 Subject: fix for recent commit "armature conversion to modifier" (armature->deformflag crash on doversion) reported by Joerg Mueller (Nexyon) --- source/blender/blenloader/intern/readfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index b23be6917ac..9125a255333 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -10877,14 +10877,15 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* parent type to modifier */ for(ob = main->object.first; ob; ob = ob->id.next) { if(ob->parent) { - Object *parent= newlibadr(fd, lib, ob->parent); + Object *parent= (Object *)newlibadr(fd, lib, ob->parent); if(parent->type==OB_ARMATURE && ob->partype==PARSKEL) { ArmatureModifierData *amd; + bArmature *arm= (bArmature *)newlibadr(fd, lib, parent->data); amd = (ArmatureModifierData*) modifier_new(eModifierType_Armature); amd->object = ob->parent; BLI_addtail((ListBase*)&ob->modifiers, amd); - amd->deformflag= ((bArmature *)(parent->data))->deformflag; + amd->deformflag= arm->deformflag; ob->partype = PAROBJECT; } else if(parent->type==OB_LATTICE && ob->partype==PARSKEL) { -- cgit v1.2.3