Fix for when there is no map for a type. Thanks Marcus !

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8596 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2004-08-16 22:45:27 +00:00
parent a468da6449
commit a612e9ccb4
+5 -1
View File
@@ -248,7 +248,11 @@ MMediaFilesManager::RewindRefs(const char* type, BString ***items, int32 *count)
entry_ref *ref;
BString *item;
fRegistryMap->Get(BString(type), &map);
*count = 0;
*items = NULL;
if (!fRegistryMap->Get(BString(type), &map))
return B_OK;
*count = map->CountItems();
*items = new (BString*)[*count];