diff --git a/src/core/cheats.cpp b/src/core/cheats.cpp index cc6099858..2a0dda220 100644 --- a/src/core/cheats.cpp +++ b/src/core/cheats.cpp @@ -1994,7 +1994,7 @@ std::unique_ptr 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();