[Bf-blender-cvs] [95c82513cae] blender-v2.83-release: Fix potential crash opening 3.0 blend files in older versions.
Bastien Montagne
noreply at git.blender.org
Mon Nov 22 14:33:55 CET 2021
Commit: 95c82513caebe49577ec85963cfff63116064ef2
Author: Bastien Montagne
Date: Mon Nov 22 14:27:02 2021 +0100
Branches: blender-v2.83-release
https://developer.blender.org/rB95c82513caebe49577ec85963cfff63116064ef2
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.
===================================================================
M source/blender/makesrna/intern/rna_object.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list