aboutsummaryrefslogtreecommitdiff
path: root/engines/tony
diff options
context:
space:
mode:
authorTorbjörn Andersson2012-07-02 20:51:14 +0200
committerTorbjörn Andersson2012-07-02 20:51:14 +0200
commit9cc7d6c6c5fc260fd88135db3d14fa61841370eb (patch)
tree0919433ef901163ec80726ee48dadb4deb75ed8e /engines/tony
parent924aac4389abaf7bd3ce266fbd53c0bcdf474ba9 (diff)
downloadscummvm-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.
Diffstat (limited to 'engines/tony')
-rw-r--r--engines/tony/game.cpp3
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;