Delete types when that's what you mean, not strings from the wrong list. Fixes a double free() that made ThemeManager crash.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38105 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1345706a9f
commit
a4c54e94e8
@ -280,8 +280,8 @@ BMediaFiles::RemoveItem(const char* type, const char* item)
|
||||
void
|
||||
BMediaFiles::_ClearTypes()
|
||||
{
|
||||
for (int32 i = 0; i < fItems.CountItems(); i++)
|
||||
delete (BString*)fItems.ItemAt(i);
|
||||
for (int32 i = 0; i < fTypes.CountItems(); i++)
|
||||
delete (BString*)fTypes.ItemAt(i);
|
||||
|
||||
fTypes.MakeEmpty();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user