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:
parent
82d5905e4b
commit
41495707d2
|
@ -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);
|
||||
}
|
||||
|
||||
/* ********************************************************* */
|
||||
|
|
Loading…
Reference in New Issue