Cheats: Fix crash on parsing invalid cheat

pull/3325/head
Stenzek 1 year ago
parent 24f15acf6c
commit 218df625df
No known key found for this signature in database

@ -1994,7 +1994,7 @@ std::unique_ptr<Cheats::GamesharkCheatCode> Cheats::GamesharkCheatCode::Parse(Me
code->instructions.push_back(inst);
}
if (code->instructions.empty())
if (code && code->instructions.empty())
{
Error::SetStringFmt(error, "No instructions in code.");
code.reset();

Loading…
Cancel
Save