FontManagerBase: remove families from BObject list when deleting them

possibly related to #18169

Change-Id: If878109e7d739494d71ff97447de6bdeaa9f905d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6056
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
Dale Cieslak 2023-02-09 23:30:10 -08:00 committed by waddlesplash
parent 125b262675
commit 88f36b2dd9

View File

@ -67,7 +67,7 @@ FontManagerBase::FontManagerBase(bool init_freetype, const char* className)
FontManagerBase::~FontManagerBase()
{
for (int32 i = fFamilies.CountItems(); i-- > 0;)
delete fFamilies.ItemAt(i);
delete fFamilies.RemoveItemAt(i);
fStyleHashTable.Clear();