diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index 6f7568a3a1..d6abd08263 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -193,8 +193,10 @@ void CVolumeGC::LoadBannerFile() const GCBanner banner_file; std::unique_ptr file_system(CreateFileSystem(this, PARTITION_NONE)); - size_t file_size = static_cast(file_system->GetFileSize("opening.bnr")); + if (!file_system) + return; + size_t file_size = static_cast(file_system->GetFileSize("opening.bnr")); constexpr int BNR1_MAGIC = 0x31524e42; constexpr int BNR2_MAGIC = 0x32524e42; if (file_size != BNR1_SIZE && file_size != BNR2_SIZE) diff --git a/Source/Core/DiscIO/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/VolumeWiiCrypted.cpp index 310d447c43..05d34aa126 100644 --- a/Source/Core/DiscIO/VolumeWiiCrypted.cpp +++ b/Source/Core/DiscIO/VolumeWiiCrypted.cpp @@ -299,6 +299,9 @@ std::string CVolumeWiiCrypted::GetInternalName(const Partition& partition) const std::map CVolumeWiiCrypted::GetLongNames() const { std::unique_ptr file_system(CreateFileSystem(this, GetGamePartition())); + if (!file_system) + return {{}}; + std::vector opening_bnr(NAMES_TOTAL_BYTES); size_t size = file_system->ReadFile("opening.bnr", opening_bnr.data(), opening_bnr.size(), 0x5C); opening_bnr.resize(size);