mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-10 07:14:21 +00:00
Loader: handle fs::file is Null fatal after decrypt self
This commit is contained in:
parent
3ed98be6cd
commit
ab84a67511
@ -1099,11 +1099,9 @@ void Emulator::Load(bool add_only)
|
||||
{
|
||||
elf_file.open(decrypted_path);
|
||||
}
|
||||
else
|
||||
// Decrypt SELF
|
||||
else if (elf_file = decrypt_self(std::move(elf_file), klic.empty() ? nullptr : klic.data()))
|
||||
{
|
||||
// Decrypt SELF
|
||||
elf_file = decrypt_self(std::move(elf_file), klic.empty() ? nullptr : klic.data());
|
||||
|
||||
if (fs::file elf_out{decrypted_path, fs::rewrite})
|
||||
{
|
||||
elf_out.write(elf_file.to_vector<u8>());
|
||||
@ -1117,16 +1115,17 @@ void Emulator::Load(bool add_only)
|
||||
}
|
||||
}
|
||||
|
||||
ppu_exec_object ppu_exec;
|
||||
ppu_prx_object ppu_prx;
|
||||
spu_exec_object spu_exec;
|
||||
|
||||
if (!elf_file)
|
||||
{
|
||||
LOG_ERROR(LOADER, "Failed to decrypt SELF: %s", elf_path);
|
||||
return;
|
||||
}
|
||||
else if (ppu_exec.open(elf_file) == elf_error::ok)
|
||||
|
||||
ppu_exec_object ppu_exec;
|
||||
ppu_prx_object ppu_prx;
|
||||
spu_exec_object spu_exec;
|
||||
|
||||
if (ppu_exec.open(elf_file) == elf_error::ok)
|
||||
{
|
||||
// PS3 executable
|
||||
m_state = system_state::ready;
|
||||
|
Loading…
x
Reference in New Issue
Block a user