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
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-10-11 17:18:37 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-10-11 19:54:15 +0300
commit1e5e65fa9f142440689c474dd6d924ab884c7efb (patch)
treedff603cd3ed2fc3d87cc5fb2a09044586f085ab6 /source/blender/makesrna/intern/rna_pose.c
parentb57a89f06259eadee68c3b8e340dc244aa73ac9f (diff)
Fix T70695: Scene crashes Blender on open.
Note that this commit fixes the crash itself, but actual issue is *how* that situation could happen (having insert override operation with local 'source' overriding data-block with an empty bone constraints stack...).
Diffstat (limited to 'source/blender/makesrna/intern/rna_pose.c')
-rw-r--r--source/blender/makesrna/intern/rna_pose.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 0f8f8d39c41..8c4b7dd52d9 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -648,7 +648,7 @@ bool rna_PoseChannel_constraints_override_apply(Main *UNUSED(bmain),
/* Remember that insertion operations are defined and stored in correct order, which means that
* even if we insert several items in a row, we always insert first one, then second one, etc.
- * So we should always find 'anchor' constraint in both _src *and* _dst> */
+ * So we should always find 'anchor' constraint in both _src *and* _dst */
bConstraint *con_anchor = NULL;
if (opop->subitem_local_name && opop->subitem_local_name[0]) {
con_anchor = BLI_findstring(
@@ -669,7 +669,11 @@ bool rna_PoseChannel_constraints_override_apply(Main *UNUSED(bmain),
}
con_src = con_src ? con_src->next : pchan_src->constraints.first;
- BLI_assert(con_src != NULL);
+ if (con_src == NULL) {
+ printf("%s: Could not find constraint to insert, doing nothing...\n", __func__);
+ BLI_assert(0);
+ return false;
+ }
bConstraint *con_dst = BKE_constraint_duplicate_ex(con_src, 0, true);