From da511f55738ccca5e4e3a8832650f8cdd52b61dc Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 17 Nov 2023 00:38:37 +0100 Subject: [PATCH] Fix: Incorrect freeing in depsgraph RNA objects iterator Caused by 4d7274b7f43e572e3d63ec1aac47646415beeea0. The depsgraph iterator was freed twice, and the "custom" iterator wasn't freed at all. Thanks to Jesse for investigating this. --- source/blender/makesrna/intern/rna_depsgraph.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_depsgraph.cc b/source/blender/makesrna/intern/rna_depsgraph.cc index a0e2e90349b..ee6e547d4ce 100644 --- a/source/blender/makesrna/intern/rna_depsgraph.cc +++ b/source/blender/makesrna/intern/rna_depsgraph.cc @@ -340,8 +340,8 @@ static void rna_Depsgraph_objects_end(CollectionPropertyIterator *iter) DEGObjectIterData *data = (DEGObjectIterData *)((BLI_Iterator *)iter->internal.custom)->data; DEG_iterator_objects_end(static_cast(iter->internal.custom)); MEM_freeN(data->settings); - MEM_freeN(((BLI_Iterator *)iter->internal.custom)->data); MEM_delete(data); + MEM_freeN(iter->internal.custom); } static PointerRNA rna_Depsgraph_objects_get(CollectionPropertyIterator *iter)