Fix: Incorrect freeing in depsgraph RNA objects iterator

Caused by 4d7274b7f4.
The depsgraph iterator was freed twice, and the "custom"
iterator wasn't freed at all. Thanks to Jesse for investigating this.
This commit is contained in:
Hans Goudey
2023-11-17 00:38:37 +01:00
parent 4793b4592b
commit da511f5573

View File

@@ -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<BLI_Iterator *>(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)