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 <bastien@blender.org>2021-11-22 16:27:02 +0300
committerBastien Montagne <bastien@blender.org>2021-11-22 16:33:45 +0300
commit95c82513caebe49577ec85963cfff63116064ef2 (patch)
tree02acb3d22c4e324c3adf77f4aa12aa9858cd11cc
parent14b8f6c25b2912fdc669c1b5640dcb4bb7d927f1 (diff)
Fix potential crash opening 3.0 blend files in older versions.
Affects insertion of constraints in liboverrides. In some cases, when opening newer post-3.0 .blend files, the source won't be found anymore, override apply code then needs to fail properly instead of crashing. Related to refactor from rB33c5e7bcd5e5.
-rw-r--r--source/blender/makesrna/intern/rna_object.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index d72e09b1e67..5d39410013f 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1545,7 +1545,10 @@ bool rna_Object_constraints_override_apply(Main *UNUSED(bmain),
}
con_src = con_src ? con_src->next : ob_src->constraints.first;
- BLI_assert(con_src != NULL);
+ if (con_src == NULL) {
+ BLI_assert(con_src != NULL);
+ return false;
+ }
bConstraint *con_dst = BKE_constraint_duplicate_ex(con_src, 0, true);