From 81e54d05551a35643ccf06181c4c3a74dd3118f1 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Sun, 24 Aug 2008 23:16:37 +0000 Subject: Fix for bug #2055912: FW: incrustSprite fails on savegame loading. What little testing I did, this seems to work, but more testing would be nice. svn-id: r34132 --- engines/cine/gfx.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index c5799e0e62..107d4fdae9 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -200,9 +200,13 @@ void FWRenderer::incrustSprite(const objectStruct &obj) { width = animDataTable[obj.frame]._realWidth; height = animDataTable[obj.frame]._height; - assert(mask); - - drawSpriteRaw(data, mask, width, height, _background, x, y); + // There was an assert(mask) here before but it made savegame loading + // in Future Wars sometimes fail the assertion (e.g. see bug #2055912). + // Not drawing sprites that have no mask seems to work, but not sure + // if this is really a correct way to fix this. + if (mask) { + drawSpriteRaw(data, mask, width, height, _background, x, y); + } } /*! \brief Draw command box on screen -- cgit v1.2.3