[Bf-blender-cvs] [b167f5093e9] temp-lanpr-cleanup2: Fix T70789: Using Remove Single Override breaks file loading (crash).

Bastien Montagne noreply at git.blender.org
Wed Nov 13 06:04:51 CET 2019


Commit: b167f5093e98417c8c1593dea5b63acf54c4e895
Author: Bastien Montagne
Date:   Fri Nov 8 14:52:07 2019 +0100
Branches: temp-lanpr-cleanup2
https://developer.blender.org/rBb167f5093e98417c8c1593dea5b63acf54c4e895

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.

===================================================================

M	source/blender/makesrna/intern/rna_access_compare_override.c

===================================================================

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);



More information about the Bf-blender-cvs mailing list