Fix incorrect destruction of Outliner tree-elements

`TreeElement` isn't a trivial type anymore, so `MEM_delete()` should be
called, which calls the destructor.
AFAICS this would cause a memory leak, since the contained `unique_ptr`
is allocated but not destructed correctly - but it's not using the
guarded allocator so woudn't be reported.
This commit is contained in:
Julian Eisel 2022-01-14 19:08:02 +01:00
parent 82d5905e4b
commit 41495707d2
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ void outliner_free_tree_element(TreeElement *element, ListBase *parent_subtree)
MEM_freeN((void *)element->name);
}
element->type = nullptr;
MEM_freeN(element);
MEM_delete(element);
}
/* ********************************************************* */