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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user