[Bf-blender-cvs] [7a100a3f602] master: Fix T70555: Crash when attempting to create an override for an object with a cloth modifier.
Bastien Montagne
noreply at git.blender.org
Mon Oct 7 13:18:25 CEST 2019
Commit: 7a100a3f602ae6bec963ba537933722abf457368
Author: Bastien Montagne
Date: Mon Oct 7 11:56:33 2019 +0200
Branches: master
https://developer.blender.org/rB7a100a3f602ae6bec963ba537933722abf457368
Fix T70555: Crash when attempting to create an override for an object with a cloth modifier.
Was not taking into account the case where pointer RNA prop is valid,
but has no data (i.e. is a 'null' pointer)...
===================================================================
M source/blender/makesrna/intern/rna_rna.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 26c8df4c7bb..4db702b215f 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -1157,20 +1157,21 @@ static bool rna_property_override_diff_propptr_validate_diffing(PointerRNA *prop
*r_is_id = *r_is_null = *r_is_type_diff = false;
/* Beware, PointerRNA_NULL has no type and is considered a 'blank page'! */
- if (propptr_a->type == NULL) {
- if (propptr_b == NULL || propptr_b->type == NULL) {
+ if (ELEM(NULL, propptr_a->type, propptr_a->data)) {
+ if (ELEM(NULL, propptr_b, propptr_b->type, propptr_b->data)) {
*r_is_null = true;
}
else {
*r_is_id = RNA_struct_is_ID(propptr_b->type);
*r_is_null = true;
- *r_is_type_diff = true;
+ *r_is_type_diff = propptr_a->type != propptr_b->type;
}
is_valid_for_diffing = false;
}
else {
*r_is_id = RNA_struct_is_ID(propptr_a->type);
- *r_is_null = *r_is_type_diff = (ELEM(NULL, propptr_b, propptr_b->type));
+ *r_is_null = (ELEM(NULL, propptr_b, propptr_b->type, propptr_b->data));
+ *r_is_type_diff = (propptr_b == NULL || propptr_b->type != propptr_a->type);
is_valid_for_diffing = !(*r_is_id || *r_is_null);
}
More information about the Bf-blender-cvs
mailing list