diff --git a/src/emulator.cpp b/src/emulator.cpp index 8b33f811..ae3cb17d 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -308,9 +308,13 @@ void Emulator::LoadSystemModules(const std::filesystem::path& file, std::string LOG_INFO(Loader, "No HLE available for {} module", module_name); } } - for (const auto& entry : std::filesystem::directory_iterator(sys_module_path / game_serial)) { - LOG_INFO(Loader, "Loading {} from game serial file {}", entry.path().string(), game_serial); - linker->LoadModule(entry.path()); + if (std::filesystem::exists(sys_module_path / game_serial)) { + for (const auto& entry : + std::filesystem::directory_iterator(sys_module_path / game_serial)) { + LOG_INFO(Loader, "Loading {} from game serial file {}", entry.path().string(), + game_serial); + linker->LoadModule(entry.path()); + } } }