file_sys: handle null romfs

This commit is contained in:
Liam 2023-12-01 23:39:48 -05:00
parent e9a43bae6f
commit 45b6161582
5 changed files with 17 additions and 21 deletions

View file

@ -74,10 +74,8 @@ AppLoader_NCA::LoadResult AppLoader_NCA::Load(Kernel::KProcess& process, Core::S
return load_result;
}
if (nca->GetRomFS() != nullptr && nca->GetRomFS()->GetSize() > 0) {
system.GetFileSystemController().RegisterRomFS(std::make_unique<FileSys::RomFSFactory>(
*this, system.GetContentProvider(), system.GetFileSystemController()));
}
system.GetFileSystemController().RegisterRomFS(std::make_unique<FileSys::RomFSFactory>(
*this, system.GetContentProvider(), system.GetFileSystemController()));
is_loaded = true;
return load_result;