BDirectory: GetNextEntry() should unset entry when one is not found.
Fixes #1692.
This commit is contained in:
@@ -338,6 +338,8 @@ BDirectory::GetNextEntry(BEntry* entry, bool traverse)
|
|||||||
if (error == B_OK)
|
if (error == B_OK)
|
||||||
error = entry->SetTo(&ref, traverse);
|
error = entry->SetTo(&ref, traverse);
|
||||||
}
|
}
|
||||||
|
if (error != B_OK && entry != NULL)
|
||||||
|
entry->Unset();
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user