aboutsummaryrefslogtreecommitdiff
path: root/simon/debugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'simon/debugger.cpp')
-rw-r--r--simon/debugger.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/simon/debugger.cpp b/simon/debugger.cpp
index a11dc9d8c4..300e9dffb8 100644
--- a/simon/debugger.cpp
+++ b/simon/debugger.cpp
@@ -195,9 +195,10 @@ bool Debugger::Cmd_StartSubroutine(int argc, const char **argv) {
uint subroutine = atoi(argv[1]);
Subroutine *sub;
sub = _vm->getSubroutineByID(subroutine);
- _vm->startSubroutine(sub);
+ if (sub != NULL)
+ _vm->startSubroutine(sub);
} else
- DebugPrintf("Syntax: sub <subroutinenum>\n");
+ DebugPrintf("Subroutine %d\n", _vm->_subroutine);
return true;
}