Revision: 52497
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52497
Author:   aligorith
Date:     2012-11-22 23:19:15 +0000 (Thu, 22 Nov 2012)
Log Message:
-----------
Bugfix [#33268] Crash when delete all or segment from curve with SplineIK

Path rebuild may fail after certain editing operations. Instead of blindly
assuming that path rebuilds will always succeed, we now give up trying to
evaluate in case of failure.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/armature.c

Modified: trunk/blender/source/blender/blenkernel/intern/armature.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/armature.c   2012-11-22 
22:58:01 UTC (rev 52496)
+++ trunk/blender/source/blender/blenkernel/intern/armature.c   2012-11-22 
23:19:15 UTC (rev 52497)
@@ -1822,8 +1822,15 @@
                 */
 
                /* only happens on reload file, but violates depsgraph still... 
fix! */
-               if ((cu->path == NULL) || (cu->path->data == NULL))
+               if (ELEM(NULL, cu->path, cu->path->data)) {
                        BKE_displist_make_curveTypes(scene, ikData->tar, 0);
+                       
+                       /* path building may fail in EditMode after removing 
verts [#33268]*/
+                       if (ELEM(NULL, cu->path, cu->path->data)) {
+                               /* BLI_assert(cu->path != NULL); */
+                               return;
+                       }
+               }
        }
 
        /* find the root bone and the chain of bones from the root to the tip

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to