The FontStyles are already deleted when deconstructing the family list - the

styles hash table shouldn't try to delete them again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14780 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-11-08 19:04:01 +00:00
parent 68e424c88b
commit 5e4d267b5e
3 changed files with 11 additions and 3 deletions
+4
View File
@@ -88,6 +88,10 @@ FontManager::~FontManager()
{
FTC_Manager_Done(ftmanager);
FT_Done_FreeType(gFreeTypeLibrary);
// we need to make sure the hash table doesn't delete the font styles;
// that's already done by the lists
fStyleHashTable.MakeEmpty(false);
}
+6 -2
View File
@@ -45,15 +45,19 @@ HashTable::~HashTable()
void
HashTable::MakeEmpty()
HashTable::MakeEmpty(bool deleteValues)
{
if (fTable == NULL)
return;
for (int32 index = fCapacity; --index >= 0;) {
struct entry *entry, *next;
for (entry = fTable[index]; entry != NULL; entry = next) {
next = entry->next;
delete entry->value;
if (deleteValues)
delete entry->value;
delete entry;
}
}