diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index 37b9e45476..496fef30b1 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -449,6 +449,8 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter) QSet serials; + QMutex mutex_cat; + QList indices; for (size_t i = 0; i < path_list.size(); ++i) indices.append(i); @@ -482,9 +484,12 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter) game.bootable = psf::get_integer(psf, "BOOTABLE", 0); game.attr = psf::get_integer(psf, "ATTRIBUTE", 0); + mutex_cat.lock(); + // Detect duplication if (!serial_cat_name[game.serial].emplace(game.category + game.name).second) { + mutex_cat.unlock(); return; } @@ -514,6 +519,8 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter) game.category = sstr(category::other); } + mutex_cat.unlock(); + // Load ICON0.PNG QPixmap icon;