Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-08-19 17:46:31 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-08-19 17:48:04 +0300
commitc8e775180b3d3ad540b6d5f88e92162b7c93f098 (patch)
tree86dd4a19d5c1ea7882347c46179f00f772b81bbc /source
parentcaed5b04d2116acc9973b90c444d52190755c404 (diff)
Fix crash when loading a file with existing proxy, and lib has been edited.
Editing a lib char should never, ever be done once you have proxies of it in your project, that will most certainly break a lot of things... But at leats let's try no to crash here.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/armature_update.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c
index cd1cdce91e0..00975976130 100644
--- a/source/blender/blenkernel/intern/armature_update.c
+++ b/source/blender/blenkernel/intern/armature_update.c
@@ -887,6 +887,7 @@ void BKE_pose_eval_proxy_copy_bone(struct Depsgraph *depsgraph, Object *object,
}
BLI_assert(ID_IS_LINKED(object) && object->proxy_from != NULL);
bPoseChannel *pchan = pose_pchan_get_indexed(object, pchan_index);
+ BLI_assert(pchan != NULL);
DEG_debug_print_eval_subdata(
depsgraph, __func__, object->id.name, object, "pchan", pchan->name, pchan);
/* TODO(sergey): Use indexed lookup, once it's guaranteed to be kept
@@ -897,8 +898,13 @@ void BKE_pose_eval_proxy_copy_bone(struct Depsgraph *depsgraph, Object *object,
#else
bPoseChannel *pchan_from = BKE_pose_channel_find_name(object->proxy_from->pose, pchan->name);
#endif
- BLI_assert(pchan != NULL);
- BLI_assert(pchan_from != NULL);
+ if (pchan_from == NULL) {
+ printf(
+ "WARNING: Could not find bone %s in linked ID anymore... "
+ "You should delete and re-generate your proxy.\n",
+ pchan->name);
+ return;
+ }
BKE_pose_copyesult_pchan_result(pchan, pchan_from);
copy_dq_dq(&pchan->runtime.deform_dual_quat, &pchan_from->runtime.deform_dual_quat);
BKE_pchan_bbone_segments_cache_copy(pchan, pchan_from);