From 08d5bad60d1293e28aeeec7f5ed028ccbed5bc85 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 22 Nov 2012 23:19:15 +0000 Subject: 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. --- source/blender/blenkernel/intern/armature.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/armature.c') 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 -- cgit v1.2.3