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 <b.mont29@gmail.com>2019-11-08 16:52:07 +0300
committerBastien Montagne <b.mont29@gmail.com>2019-11-08 16:52:57 +0300
commit76be5b5bf5c830f8a3a3640fcf439bdca3a9aa89 (patch)
treeba5b8c3482e4650f31e744d4bf69a9fea9aa855a /source/blender/makesrna/intern/rna_access_compare_override.c
parent3b66d2ed21a35036f8221d831f96556f85261db9 (diff)
Fix T70789: Using Remove Single Override breaks file loading (crash).
We only need to refine rna pointer for actual collection properties, other arrays we handle directly the the appy callback.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access_compare_override.c')
-rw-r--r--source/blender/makesrna/intern/rna_access_compare_override.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c
index 18fbe7886e9..7dae3cbf339 100644
--- a/source/blender/makesrna/intern/rna_access_compare_override.c
+++ b/source/blender/makesrna/intern/rna_access_compare_override.c
@@ -890,8 +890,11 @@ static void rna_property_override_apply_ex(Main *bmain,
* Note that here, src is the local saved ID, and dst is a copy of the linked ID (since we use
* local ID as storage to apply local changes on top of a clean copy of the linked data). */
PointerRNA private_ptr_item_dst, private_ptr_item_src, private_ptr_item_storage;
- if (opop->subitem_local_name != NULL || opop->subitem_reference_name != NULL ||
- opop->subitem_local_index != -1 || opop->subitem_reference_index != -1) {
+ if ((RNA_property_type(prop_dst) == PROP_COLLECTION &&
+ RNA_property_type(prop_src) == PROP_COLLECTION &&
+ (prop_storage == NULL || RNA_property_type(prop_storage) == PROP_COLLECTION)) &&
+ (opop->subitem_local_name != NULL || opop->subitem_reference_name != NULL ||
+ opop->subitem_local_index != -1 || opop->subitem_reference_index != -1)) {
RNA_POINTER_INVALIDATE(&private_ptr_item_dst);
RNA_POINTER_INVALIDATE(&private_ptr_item_src);
RNA_POINTER_INVALIDATE(&private_ptr_item_storage);