Skip to content

Commit

Permalink
TSAGE: Fix assert triggering when there's nothing to update on screen
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegr committed Jan 8, 2012
1 parent 2bc89ea commit 4938e49
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions engines/tsage/graphics.cpp
Expand Up @@ -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());
Expand Down

0 comments on commit 4938e49

Please sign in to comment.