Bugfix:
authorJoshua Leung <aligorith@gmail.com>
Sat, 14 Jun 2008 03:00:38 +0000 (03:00 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sat, 14 Jun 2008 03:00:38 +0000 (03:00 +0000)
Campbell's recent commit to fix game-engine pose/ipo corruption was causing segfaults with duplicating armatures.

source/blender/blenkernel/intern/object.c

index 125243bc56ff91c9d104dc70e997a8f7024e4f9d..b72d9a0b044036289754e0ed4a2a1d220250e7bc 100644 (file)
@@ -1100,6 +1100,8 @@ static void copy_object_pose(Object *obn, Object *ob)
 {
        bPoseChannel *chan;
        
+       /* note: need to clear obn->pose pointer first, so that copy_pose works (otherwise there's a crash) */
+       obn->pose= NULL;
        copy_pose(&obn->pose, ob->pose, 1);     /* 1 = copy constraints */
 
        for (chan = obn->pose->chanbase.first; chan; chan=chan->next){