* 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:
parent
1339ccf411
commit
300b908999
|
@ -69,6 +69,7 @@ BMediaFiles::GetNextType(BString* _type)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
if (fTypeIndex < 0 || fTypeIndex >= fTypes.CountItems()) {
|
if (fTypeIndex < 0 || fTypeIndex >= fTypes.CountItems()) {
|
||||||
|
_ClearTypes();
|
||||||
fTypeIndex = -1;
|
fTypeIndex = -1;
|
||||||
return B_BAD_INDEX;
|
return B_BAD_INDEX;
|
||||||
}
|
}
|
||||||
|
@ -122,6 +123,7 @@ BMediaFiles::GetNextRef(BString* _type, entry_ref* _ref)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
if (fItemIndex < 0 || fItemIndex >= fItems.CountItems()) {
|
if (fItemIndex < 0 || fItemIndex >= fItems.CountItems()) {
|
||||||
|
_ClearItems();
|
||||||
fItemIndex = -1;
|
fItemIndex = -1;
|
||||||
return B_BAD_INDEX;
|
return B_BAD_INDEX;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue