diff options
author | Bastien Montagne <bastien@blender.org> | 2020-09-14 11:28:31 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-09-16 15:32:15 +0300 |
commit | bcacd98a6a9346c9e47ef29bd1f85ac2bb408f4c (patch) | |
tree | dc62c5df0dbd71c8a60d7c0bc27af52f1f693ac5 /source/blender | |
parent | a4be38c0650bb4006b5c5b2d517503f904de5ed8 (diff) |
Fix T80457: Library Override - Custom Property to Drive Child Particles results in Crash.
RNA diffing code was not dealing properly valid NULL PointerRNA (like
the empty texture slots of a ParticleSettings e.g., which were cause of
crash in that report).
To be backported to 2.90 and 2.83.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 4ee144e9031..96e6980aa1d 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -1186,9 +1186,12 @@ static bool rna_property_override_diff_propptr_validate_diffing(PointerRNA *prop * This helps a lot in library override case, especially to detect inserted items in collections. */ if (!no_prop_name && (is_valid_for_diffing || do_force_name)) { - PropertyRNA *nameprop_a = RNA_struct_name_property(propptr_a->type); - PropertyRNA *nameprop_b = (propptr_b != NULL) ? RNA_struct_name_property(propptr_b->type) : - NULL; + PropertyRNA *nameprop_a = (propptr_a->type != NULL) ? + RNA_struct_name_property(propptr_a->type) : + NULL; + PropertyRNA *nameprop_b = (propptr_b != NULL && propptr_b->type != NULL) ? + RNA_struct_name_property(propptr_b->type) : + NULL; int propname_a_len = 0, propname_b_len = 0; char *propname_a = NULL; |