diff --git a/rpcs3/Crypto/unself.cpp b/rpcs3/Crypto/unself.cpp index a77419372c..9df111260b 100644 --- a/rpcs3/Crypto/unself.cpp +++ b/rpcs3/Crypto/unself.cpp @@ -1258,7 +1258,12 @@ static bool CheckDebugSelf(fs::file& s) } extern fs::file decrypt_self(fs::file elf_or_self) -{ +{ + if (!elf_or_self) + { + return fs::file{}; + } + elf_or_self.seek(0); // Check SELF header first. Check for a debug SELF.