From 546f6304efc2534ece73d9de26a3490c9a532a98 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 25 Oct 2020 19:13:19 +0100 Subject: [PATCH] Fixed a crash when unflagging the last file entry as favorite. --- es-app/src/views/gamelist/ISimpleGameListView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/es-app/src/views/gamelist/ISimpleGameListView.cpp b/es-app/src/views/gamelist/ISimpleGameListView.cpp index e75f0f16f..15e92ffa0 100644 --- a/es-app/src/views/gamelist/ISimpleGameListView.cpp +++ b/es-app/src/views/gamelist/ISimpleGameListView.cpp @@ -307,7 +307,9 @@ bool ISimpleGameListView::input(InputConfig* config, Input input) // Jump to the first entry in the gamelist if the last favorite was unmarked. if (foldersOnTop && removedLastFavorite && !entryToUpdate->getSystem()->isCustomCollection()) - setCursor(getFirstGameEntry()); + ViewController::get()->getGameListView(entryToUpdate->getSystem())-> + setCursor(ViewController::get()->getGameListView(entryToUpdate-> + getSystem())->getFirstGameEntry()); else if (removedLastFavorite && !entryToUpdate->getSystem()->isCustomCollection()) setCursor(getFirstEntry());