[Scummvm-git-logs] scummvm master -> 85988319742beb541517bc5f62377ecd00abc157
sev-
noreply at scummvm.org
Wed Apr 3 22:15:46 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8598831974 TONY: Fix crash with rapid cursor changes
Commit: 85988319742beb541517bc5f62377ecd00abc157
https://github.com/scummvm/scummvm/commit/85988319742beb541517bc5f62377ecd00abc157
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-04-04T00:14:18+02:00
Commit Message:
TONY: Fix crash with rapid cursor changes
Steps to reproduce:
- Start walking to a different location
- While walking, select some item from the cursor
This will lead to a crash, since cursor is reset on entry
Changed paths:
engines/tony/game.cpp
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index 2db4c7d4959..0f06578ef83 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -1494,11 +1494,14 @@ void RMPointer::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim
CORO_INVOKE_2(_pointer[_ctx->n]->draw, bigBuf, prim);
} else {
- if (_nCurSpecialPointer == PTR_CUSTOM)
- CORO_INVOKE_2(_nCurCustomPointer->draw, bigBuf, prim);
- else
+ if (_nCurSpecialPointer == PTR_CUSTOM) {
+ if (_nCurCustomPointer)
+ CORO_INVOKE_2(_nCurCustomPointer->draw, bigBuf, prim);
+ } else {
// Call the draw on the special pointer
- CORO_INVOKE_2(_specialPointer[_nCurSpecialPointer - 1]->draw, bigBuf, prim);
+ if (_specialPointer[_nCurSpecialPointer - 1])
+ CORO_INVOKE_2(_specialPointer[_nCurSpecialPointer - 1]->draw, bigBuf, prim);
+ }
}
CORO_END_CODE;
More information about the Scummvm-git-logs
mailing list