Ensure we reset the browse list if there are no categories to show.

This commit is contained in:
casey langen 2022-12-21 15:48:29 -08:00
parent 452bcb4a2c
commit 7be532bb72

View File

@ -153,7 +153,7 @@ int64_t CategoryListView::GetSelectedId() {
if (index != NO_SELECTION && this->metadata && index < this->metadata->Count()) {
return this->metadata->At(index)->GetId();
}
return this->selectAfterQuery == -1LL ? -1LL : this->selectAfterQuery;
return this->selectAfterQuery == -1LL || this->metadata->Count() == 0 ? -1LL : this->selectAfterQuery;
}
std::string CategoryListView::GetSelectedValue() {