1
0
Fork 0
forked from suyu/suyu

Merge pull request #12203 from liamwhite/crash-fix

set: don't load version nca with null romfs
This commit is contained in:
liamwhite 2023-11-29 12:34:02 -05:00 committed by GitHub
commit 80c4743754
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,7 +34,9 @@ Result GetFirmwareVersionImpl(FirmwareVersionFormat& out_firmware, Core::System&
nca = bis_system->GetEntry(FirmwareVersionSystemDataId, FileSys::ContentRecordType::Data); nca = bis_system->GetEntry(FirmwareVersionSystemDataId, FileSys::ContentRecordType::Data);
} }
if (nca) { if (nca) {
romfs = FileSys::ExtractRomFS(nca->GetRomFS()); if (auto nca_romfs = nca->GetRomFS(); nca_romfs) {
romfs = FileSys::ExtractRomFS(nca_romfs);
}
} }
if (!romfs) { if (!romfs) {
romfs = FileSys::ExtractRomFS( romfs = FileSys::ExtractRomFS(