diff options
author | Liam <byteslice@airmail.cc> | 2023-10-12 21:07:49 -0400 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-10-12 21:07:49 -0400 |
commit | faa6c35e78dd0c843de15e08e91211625bb1df67 (patch) | |
tree | d9197e8b25c0c99b627655a1c104eb4eb694e5f2 /src/yuzu/game_list.cpp | |
parent | 519c12da1566e03b87cd1066999ed673ade30608 (diff) |
qt: ensure worker cancellation is complete before clearing
Diffstat (limited to 'src/yuzu/game_list.cpp')
-rw-r--r-- | src/yuzu/game_list.cpp | 5 |
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); |