aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'scumm')
-rw-r--r--scumm/debugger.cpp5
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);