Fix double-free happening when having proxy with motion paths
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 14 Aug 2013 10:39:16 +0000 (10:39 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 14 Aug 2013 10:39:16 +0000 (10:39 +0000)
Make it so mpath is not shared between several bones now.

Fix suggested by Joshua Leung, thanks!

source/blender/blenkernel/intern/armature.c

index eca607c08df4731e0936531c9d388d9d7b0bbb7e..f006710dc21e70b20ebd6fb85e25329bdb4bfa5d 100644 (file)
@@ -1605,7 +1605,10 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
                        pchanw.next = pchan->next;
                        pchanw.parent = pchan->parent;
                        pchanw.child = pchan->child;
-                       
+
+                       pchanw.mpath = pchan->mpath;
+                       pchan->mpath = NULL;
+
                        /* this is freed so copy a copy, else undo crashes */
                        if (pchanw.prop) {
                                pchanw.prop = IDP_CopyProperty(pchanw.prop);