diff options
author | Joshua Leung <aligorith@gmail.com> | 2012-11-23 03:19:15 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2012-11-23 03:19:15 +0400 |
commit | 08d5bad60d1293e28aeeec7f5ed028ccbed5bc85 (patch) | |
tree | f69272db3718051075cddd74c669e2a3a273b6bd /source/blender/blenkernel/intern/armature.c | |
parent | c8734334a128bbaae338c65090fa3d23a4b1f04f (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern/armature.c')
-rw-r--r-- | source/blender/blenkernel/intern/armature.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index b3cbc1f2b16..1970df54339 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1822,8 +1822,15 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos */ /* 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 |