From 4c430c9b4ae7e834968e7eef5c52649ae63d5c92 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 28 Jan 2004 03:08:42 +0000 Subject: Another safety check. svn-id: r12652 --- simon/debugger.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'simon') 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 \n"); + DebugPrintf("Subroutine %d\n", _vm->_subroutine); return true; } -- cgit v1.2.3