From 23638a07d34c9d4c30e0b4e65b419c7862853e24 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Tue, 28 Aug 2012 17:19:00 +0200 Subject: TONY: Fix crash with TA_PERORATE. --- engines/tony/game.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines/tony') 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 -- cgit v1.2.3