diff options
author | Bastien Bouclet | 2016-02-14 09:44:03 +0100 |
---|---|---|
committer | Bastien Bouclet | 2016-02-14 09:58:43 +0100 |
commit | 4b81c807c8432e48be64d971a4b6cc932bb9c109 (patch) | |
tree | d954fa61ea129f2ae834f187b47f3e57ea6deabc /engines | |
parent | fe7e58d0d14e83a6a005f95237cb11d6a1119e83 (diff) | |
download | scummvm-rg350-4b81c807c8432e48be64d971a4b6cc932bb9c109.tar.gz scummvm-rg350-4b81c807c8432e48be64d971a4b6cc932bb9c109.tar.bz2 scummvm-rg350-4b81c807c8432e48be64d971a4b6cc932bb9c109.zip |
MOHAWK: Issue a warning when trying to pop with no card pushed
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mohawk/myst_scripts.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp index a935ef5e5f..0e14b24ed3 100644 --- a/engines/mohawk/myst_scripts.cpp +++ b/engines/mohawk/myst_scripts.cpp @@ -509,6 +509,11 @@ void MystScriptParser::o_changeCardPop(uint16 op, uint16 var, uint16 argc, uint1 debugC(kDebugScript, "Opcode %d: Return To Stored Card Id", op); debugC(kDebugScript, "\tCardId: %d", _savedCardId); + if (_savedCardId == 0) { + warning("No pushed card to go back to"); + return; + } + TransitionType transition = static_cast<TransitionType>(argv[0]); _vm->changeToCard(_savedCardId, transition); |