From a4c54e94e8b7b7e67eb75dc2069b136179ca0453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sun, 15 Aug 2010 03:52:35 +0000 Subject: [PATCH] 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 --- src/kits/media/MediaFiles.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kits/media/MediaFiles.cpp b/src/kits/media/MediaFiles.cpp index 77bdde3091..5a6fe5f146 100644 --- a/src/kits/media/MediaFiles.cpp +++ b/src/kits/media/MediaFiles.cpp @@ -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(); }