Skip to content

Commit

Permalink
TONY: Fix crash when entering "sepia" mode by loading a savegame.
Browse files Browse the repository at this point in the history
Apparently, in this case the cursor is updated before _precalcTable
has been created. Added safeguard against that.
  • Loading branch information
Torbjörn Andersson committed Jul 2, 2012
1 parent 924aac4 commit 9cc7d6c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions engines/tony/game.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 9cc7d6c

Please sign in to comment.