From 9cc7d6c6c5fc260fd88135db3d14fa61841370eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Andersson?= Date: Mon, 2 Jul 2012 20:51:14 +0200 Subject: [PATCH] TONY: Fix crash when entering "sepia" mode by loading a savegame. Apparently, in this case the cursor is updated before _precalcTable has been created. Added safeguard against that. --- engines/tony/game.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp index 5b9502468ae5..f1e8f0e61477 100644 --- a/engines/tony/game.cpp +++ b/engines/tony/game.cpp @@ -1601,6 +1601,9 @@ void RMPointer::updateCursor() { // If in black & white mode, convert the cursor if (GLOBALS._bCfgAnni30) { + if (!RMGfxTargetBuffer::_precalcTable) { + RMGfxTargetBuffer::createBWPrecalcTable(); + } uint16 *src = (uint16 *)cursorData; for (int i = 0; i < 64; i++) { uint16 *lineP = src;