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:
@@ -248,7 +248,11 @@ MMediaFilesManager::RewindRefs(const char* type, BString ***items, int32 *count)
|
|||||||
entry_ref *ref;
|
entry_ref *ref;
|
||||||
BString *item;
|
BString *item;
|
||||||
|
|
||||||
fRegistryMap->Get(BString(type), &map);
|
*count = 0;
|
||||||
|
*items = NULL;
|
||||||
|
|
||||||
|
if (!fRegistryMap->Get(BString(type), &map))
|
||||||
|
return B_OK;
|
||||||
|
|
||||||
*count = map->CountItems();
|
*count = map->CountItems();
|
||||||
*items = new (BString*)[*count];
|
*items = new (BString*)[*count];
|
||||||
|
|||||||
Reference in New Issue
Block a user