AddOnManager::GetStreamers: Consider maxCount and outCount
* Fix a little issue when getting the plugin.
This commit is contained in:
parent
dc94132564
commit
21cf69c709
@ -210,12 +210,18 @@ AddOnManager::GetStreamers(entry_ref* outRefs, int32* outCount,
|
||||
BAutolock locker(fLock);
|
||||
RegisterAddOns();
|
||||
|
||||
int32 count = 0;
|
||||
streamer_info* info;
|
||||
for (fStreamerList.Rewind(); fStreamerList.GetNext(&info);) {
|
||||
if (count == maxCount)
|
||||
break;
|
||||
|
||||
*outRefs = info->ref;
|
||||
outRefs++;
|
||||
count++;
|
||||
}
|
||||
|
||||
*outCount = count;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user