Fixed a rare crash when editing custom collections.

This commit is contained in:
Leon Styhre 2023-03-05 12:33:47 +01:00
parent fc03134ef0
commit b073579f44

View file

@ -1214,9 +1214,9 @@ void ViewController::reloadGamelistView(GamelistView* view, bool reloadTheme)
std::shared_ptr<GamelistView> newView {getGamelistView(system)};
// To counter having come from a placeholder.
if (!cursor->isPlaceHolder()) {
if (!cursor->isPlaceHolder() && cursor->getParent() != nullptr)
newView->setCursor(cursor);
}
if (isCurrent)
mCurrentView = newView;