mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 14:21:52 +01:00
Null-Check Optional NACP before extracting application title
Not doing this can lead to the NACP being filled with invalid data and led to crashes on homebrew titles like SpaceNX.
This commit is contained in:
parent
c8821c7313
commit
1d532628cb
@ -64,7 +64,7 @@ namespace skyline::loader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
state.process->memory.InitializeVmm(memory::AddressSpaceType::AddressSpace39Bit);
|
state.process->memory.InitializeVmm(memory::AddressSpaceType::AddressSpace39Bit);
|
||||||
auto applicationName{nacp->GetApplicationName(nacp->GetFirstSupportedTitleLanguage())};
|
auto applicationName{nacp ? nacp->GetApplicationName(nacp->GetFirstSupportedTitleLanguage()) : ""};
|
||||||
auto loadInfo{LoadExecutable(process, state, executable, 0, applicationName.empty() ? "main.nro" : applicationName + ".nro")};
|
auto loadInfo{LoadExecutable(process, state, executable, 0, applicationName.empty() ? "main.nro" : applicationName + ".nro")};
|
||||||
state.process->memory.InitializeRegions(loadInfo.base, loadInfo.size);
|
state.process->memory.InitializeRegions(loadInfo.base, loadInfo.size);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user