From 218df625df5e450814eaea85860be4dc038665f8 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 27 Oct 2024 12:32:09 +1000 Subject: [PATCH] Cheats: Fix crash on parsing invalid cheat --- src/core/cheats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/cheats.cpp b/src/core/cheats.cpp index cc60998589..2a0dda2202 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();