[Bf-blender-cvs] [99c5146e9a7] blender-v3.4-release: Fix T101433: crash when deleting hierarchy referenced by Collection Info node

Jacques Lucke noreply at git.blender.org
Mon Nov 28 12:51:34 CET 2022


Commit: 99c5146e9a7a9941a0efef3d0d2852e65b5dbb9b
Author: Jacques Lucke
Date:   Mon Nov 28 12:51:10 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rB99c5146e9a7a9941a0efef3d0d2852e65b5dbb9b

Fix T101433: crash when deleting hierarchy referenced by Collection Info node

The issue was that geometry nodes was not reevaluated after changing the
content of the collection. That resulted in the other object still having a
reference to the deleted object, which resulted in a crash when it tried to
access it.

Adding the `ID_RECALC_GEOMETRY` tag indicates that the content of the
collection has changed and will trigger geometry nodes setups that depend
on the collection to update.

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

M	source/blender/blenkernel/intern/collection.c

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

diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 751b5185e39..53ef78525c2 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -1122,7 +1122,8 @@ static bool collection_object_remove(Main *bmain,
     id_us_min(&ob->id);
   }
 
-  collection_tag_update_parent_recursive(bmain, collection, ID_RECALC_COPY_ON_WRITE);
+  collection_tag_update_parent_recursive(
+      bmain, collection, ID_RECALC_COPY_ON_WRITE | ID_RECALC_GEOMETRY);
 
   return true;
 }



More information about the Bf-blender-cvs mailing list