aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/mohawk/riven_stacks/tspit.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/mohawk/riven_stacks/tspit.cpp b/engines/mohawk/riven_stacks/tspit.cpp
index 9546d946ab..85e4b2f4ae 100644
--- a/engines/mohawk/riven_stacks/tspit.cpp
+++ b/engines/mohawk/riven_stacks/tspit.cpp
@@ -362,8 +362,12 @@ void TSpit::xtakeit(const ArgumentArray &args) {
}
}
- // xtakeit() shouldn't be called if we're not on a marble hotspot
- assert(marble != 0);
+ if (marble == 0) {
+ // xtakeit() shouldn't be called if we're not on a marble hotspot,
+ // but maybe another mouse moved event was received between the moment
+ // this script was queued and the moment it was executed.
+ return;
+ }
// Redraw the background
_vm->getCard()->drawPicture(1);