From 0089d3b338819ca28ba9100ba61d344be86057b3 Mon Sep 17 00:00:00 2001 From: David Turner Date: Tue, 11 Jan 2011 16:50:26 +0000 Subject: 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 --- engines/cine/gfx.cpp | 7 +++++-- 1 file 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(); } -- cgit v1.2.3