diff options
| -rw-r--r-- | scumm/debugger.cpp | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp index 7bf6395cf0..db6df7650f 100644 --- a/scumm/debugger.cpp +++ b/scumm/debugger.cpp @@ -582,7 +582,10 @@ bool ScummDebugger::Cmd_PrintBoxMatrix(int argc, const char **argv) {  }  void ScummDebugger::printBox(int box) { -	assert(box < _vm->getNumBoxes()); +	if (box < 0 || box >= _vm->getNumBoxes()) { +		DebugPrintf("%d is not a valid box!\n", box); +		return; +	}  	BoxCoords coords;  	int flags = _vm->getBoxFlags(box);  	int mask = _vm->getMaskFromBox(box);  | 
