From f080798000f51c214b8f49a46e00bdaaa3bce09c Mon Sep 17 00:00:00 2001 From: Megamouse Date: Fri, 28 Apr 2023 15:25:26 +0200 Subject: [PATCH] Qt: clear game items before clearing the game list --- rpcs3/rpcs3qt/game_list_frame.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index 76773a7b35..d47522caf5 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -2839,6 +2839,11 @@ void game_list_frame::PopulateGameGrid(int maxCols, const QSize& image_size, con const std::string selected_item = CurrentSelectionPath(); // Release old data + for (const auto& game : m_game_data) + { + game->item = nullptr; + } + m_game_list->clear_list(); m_game_grid->deleteLater(); @@ -2858,8 +2863,6 @@ void game_list_frame::PopulateGameGrid(int maxCols, const QSize& image_size, con for (const auto& app : m_game_data) { - app->item = nullptr; - if (IsEntryVisible(app)) { matching_apps.push_back(app);