diff options
author | Filippos Karapetis | 2012-01-08 19:02:14 +0200 |
---|---|---|
committer | Filippos Karapetis | 2012-01-08 19:03:43 +0200 |
commit | 4938e49e2df1d2f8f794461a32a7da86f4e1e967 (patch) | |
tree | 74175d4cc226951e0caba845be08b0ce1580c887 /engines/tsage | |
parent | 2bc89ea4dcab39607002427862a6e0afacaad113 (diff) | |
download | scummvm-rg350-4938e49e2df1d2f8f794461a32a7da86f4e1e967.tar.gz scummvm-rg350-4938e49e2df1d2f8f794461a32a7da86f4e1e967.tar.bz2 scummvm-rg350-4938e49e2df1d2f8f794461a32a7da86f4e1e967.zip |
TSAGE: Fix assert triggering when there's nothing to update on screen
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/graphics.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index b211f910c1..afaf05190e 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -259,6 +259,12 @@ void GfxSurface::updateScreen() { for (Common::List<Rect>::iterator i = _dirtyRects.begin(); i != _dirtyRects.end(); ++i) { Rect r = *i; + // Make sure that there is something to update. If not, skip this + // rectangle. An example case is the speedbike closeup at the beginning + // of Ringworld (third screen). + if (r.isEmpty()) + continue; + const byte *srcP = (const byte *)_customSurface->getBasePtr(r.left, r.top); g_system->copyRectToScreen(srcP, _customSurface->pitch, r.left, r.top, r.width(), r.height()); |