aboutsummaryrefslogtreecommitdiff
path: root/engines/tony
diff options
context:
space:
mode:
authorAlyssa Milburn2012-08-28 17:19:00 +0200
committerAlyssa Milburn2012-08-28 17:19:00 +0200
commit23638a07d34c9d4c30e0b4e65b419c7862853e24 (patch)
tree63ea59baf2d20283b684dbcca8c03bbc67a3f8fc /engines/tony
parent31801137b5c6908edd76f357b3f29b07e9e3be84 (diff)
downloadscummvm-rg350-23638a07d34c9d4c30e0b4e65b419c7862853e24.tar.gz
scummvm-rg350-23638a07d34c9d4c30e0b4e65b419c7862853e24.tar.bz2
scummvm-rg350-23638a07d34c9d4c30e0b4e65b419c7862853e24.zip
TONY: Fix crash with TA_PERORATE.
Diffstat (limited to 'engines/tony')
-rw-r--r--engines/tony/game.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index 1ba8094ac4..e832b9687e 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -1537,6 +1537,11 @@ void RMPointer::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim
_ctx->n = _nCurPointer;
if (_ctx->n == TA_COMBINE) _ctx->n = TA_USE;
+ // WORKAROUND: updateCursor gets called too early sometimes (for example, when
+ // the cursor is released over the TA_PERORATE option), via setAction.
+ if (_ctx->n > 4)
+ _ctx->n = 0;
+
_cursorHotspot = _hotspot[_ctx->n];
// Call the Draw method of the pointer