* Also clear the lists after all items/types were iterated over.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34557 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-12-08 15:29:30 +00:00
parent 1339ccf411
commit 300b908999
1 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,7 @@ BMediaFiles::GetNextType(BString* _type)
{
CALLED();
if (fTypeIndex < 0 || fTypeIndex >= fTypes.CountItems()) {
_ClearTypes();
fTypeIndex = -1;
return B_BAD_INDEX;
}
@ -122,6 +123,7 @@ BMediaFiles::GetNextRef(BString* _type, entry_ref* _ref)
{
CALLED();
if (fItemIndex < 0 || fItemIndex >= fItems.CountItems()) {
_ClearItems();
fItemIndex = -1;
return B_BAD_INDEX;
}