Skip to content

Commit

Permalink
Cheats: Fix crash on parsing invalid cheat
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Oct 27, 2024
1 parent 24f15ac commit 218df62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 218df62

Please sign in to comment.