From 00e4fc4b70001280d968348c3f5008c44c3391df Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Wed, 16 Nov 2022 04:31:01 +0100 Subject: [PATCH] Netplay: Check if save is readable before marking it for sync. --- Source/Core/Core/NetPlayServer.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/NetPlayServer.cpp b/Source/Core/Core/NetPlayServer.cpp index 91f494f8df..2359dea9c3 100644 --- a/Source/Core/Core/NetPlayServer.cpp +++ b/Source/Core/Core/NetPlayServer.cpp @@ -1721,7 +1721,15 @@ std::optional NetPlayServer::CollectSaveSyncInfo() for (const u64 title : ios.GetES()->GetInstalledTitles()) { auto save = WiiSave::MakeNandStorage(sync_info.configured_fs.get(), title); - sync_info.wii_saves.emplace_back(title, std::move(save)); + if (save && save->ReadHeader().has_value() && save->ReadBkHeader().has_value() && + save->ReadFiles().has_value()) + { + sync_info.wii_saves.emplace_back(title, std::move(save)); + } + else + { + INFO_LOG_FMT(NETPLAY, "Skipping Wii save of title {:016x}.", title); + } } } else if (sync_info.game->GetPlatform() == DiscIO::Platform::WiiDisc ||