summaryrefslogtreecommitdiff
path: root/src/yuzu/game_list.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-10-13 09:29:13 -0400
committerGitHub <noreply@github.com>2023-10-13 09:29:13 -0400
commit1a4874e178860d723760d98be337cd4640b06a30 (patch)
treeafe20068da407a90e3ec5b38e3d8ae02a5afb2cd /src/yuzu/game_list.cpp
parentc00b63b9e11917b153e077e173f25bc150286f58 (diff)
parentfaa6c35e78dd0c843de15e08e91211625bb1df67 (diff)
Merge pull request #11769 from liamwhite/qt-ownership-issue
qt: ensure worker cancellation is complete before clearing
Diffstat (limited to 'src/yuzu/game_list.cpp')
-rw-r--r--src/yuzu/game_list.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index 74f48031a..2bb1a0239 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -826,12 +826,13 @@ void GameList::PopulateAsync(QVector<UISettings::GameDir>& game_dirs) {
tree_view->setColumnHidden(COLUMN_SIZE, !UISettings::values.show_size);
tree_view->setColumnHidden(COLUMN_PLAY_TIME, !UISettings::values.show_play_time);
+ // Before deleting rows, cancel the worker so that it is not using them
+ emit ShouldCancelWorker();
+
// Delete any rows that might already exist if we're repopulating
item_model->removeRows(0, item_model->rowCount());
search_field->clear();
- emit ShouldCancelWorker();
-
GameListWorker* worker =
new GameListWorker(vfs, provider, game_dirs, compatibility_list, play_time_manager, system);