diff options
author | David Turner | 2011-01-11 16:50:26 +0000 |
---|---|---|
committer | David Turner | 2011-01-11 16:50:26 +0000 |
commit | 0089d3b338819ca28ba9100ba61d344be86057b3 (patch) | |
tree | dbc61e91d83b09ac0eb4359e035fc366606d7bb5 | |
parent | dd47d644d37982b6539fca3e0de68eba64a6b213 (diff) | |
download | scummvm-rg350-0089d3b338819ca28ba9100ba61d344be86057b3.tar.gz scummvm-rg350-0089d3b338819ca28ba9100ba61d344be86057b3.tar.bz2 scummvm-rg350-0089d3b338819ca28ba9100ba61d344be86057b3.zip |
CINE: Fix for Operation Stealth assertion when caught by rat in Scene 8 Rats' Maze.
This converts the assertion on selection of null background into a test and warning.
svn-id: r55201
-rw-r--r-- | engines/cine/gfx.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index 4d61be102b..3970d88117 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -1429,10 +1429,13 @@ void OSRenderer::loadCt256(const byte *ct, const char *name) { * @param idx Background index */ void OSRenderer::selectBg(unsigned int idx) { - assert(idx < 9 && _bgTable[idx].bg); - assert(_bgTable[idx].pal.isValid() && !(_bgTable[idx].pal.empty())); + assert(idx < 9); + if (_bgTable[idx].bg) { + assert(_bgTable[idx].pal.isValid() && !(_bgTable[idx].pal.empty())); _currentBg = idx; + } else + warning("OSRenderer::selectBg(%d) - attempt to select null background", idx); reloadPalette(); } |