diff options
author | Kari Salminen | 2008-08-24 23:16:37 +0000 |
---|---|---|
committer | Kari Salminen | 2008-08-24 23:16:37 +0000 |
commit | 81e54d05551a35643ccf06181c4c3a74dd3118f1 (patch) | |
tree | 8872f9dfb448f21ff6440857adf9596b2eb4671b | |
parent | 4ec647c9191bc331471809a3cb5dc611f903d24f (diff) | |
download | scummvm-rg350-81e54d05551a35643ccf06181c4c3a74dd3118f1.tar.gz scummvm-rg350-81e54d05551a35643ccf06181c4c3a74dd3118f1.tar.bz2 scummvm-rg350-81e54d05551a35643ccf06181c4c3a74dd3118f1.zip |
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
-rw-r--r-- | engines/cine/gfx.cpp | 10 |
1 files 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 |