diff options
author | Torbjörn Andersson | 2012-07-02 20:51:14 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2012-07-02 20:51:14 +0200 |
commit | 9cc7d6c6c5fc260fd88135db3d14fa61841370eb (patch) | |
tree | 0919433ef901163ec80726ee48dadb4deb75ed8e | |
parent | 924aac4389abaf7bd3ce266fbd53c0bcdf474ba9 (diff) | |
download | scummvm-rg350-9cc7d6c6c5fc260fd88135db3d14fa61841370eb.tar.gz scummvm-rg350-9cc7d6c6c5fc260fd88135db3d14fa61841370eb.tar.bz2 scummvm-rg350-9cc7d6c6c5fc260fd88135db3d14fa61841370eb.zip |
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.
-rw-r--r-- | engines/tony/game.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp index 5b9502468a..f1e8f0e614 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; |