aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorGregory Montoir2005-07-23 16:11:20 +0000
committerGregory Montoir2005-07-23 16:11:20 +0000
commit1a5c8cd3dab869d90d96da67c6befd3acd3689dd (patch)
tree1fd15ff5a663573acebaae2af919853735ed50a2 /scumm
parent4f9dc0d5152d5c6881ce1f735689ce8bef3fd71f (diff)
downloadscummvm-rg350-1a5c8cd3dab869d90d96da67c6befd3acd3689dd.tar.gz
scummvm-rg350-1a5c8cd3dab869d90d96da67c6befd3acd3689dd.tar.bz2
scummvm-rg350-1a5c8cd3dab869d90d96da67c6befd3acd3689dd.zip
In lost/smaller, spriteGroups bounds set by Sprite::setGroupBounds() aren't always valid rects, add a check for this.
svn-id: r18578
Diffstat (limited to 'scumm')
-rw-r--r--scumm/sprite_he.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index 02525e62d2..ca450bf258 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -1372,8 +1372,9 @@ void Sprite::processImages(bool arg) {
spi->curImgFlags = wiz.img.flags;
if (spi->group && (_spriteGroups[spi->group].flags & kSGFClipBox)) {
- if (spi->bbox.intersects(_spriteGroups[spi->group].bbox)) {
- spi->bbox.clip(_spriteGroups[spi->group].bbox);
+ Common::Rect &spgBbox = _spriteGroups[spi->group].bbox;
+ if (spgBbox.isValidRect() && spi->bbox.intersects(spgBbox)) {
+ spi->bbox.clip(spgBbox);
wiz.processFlags |= kWPFClipBox;
wiz.box = spi->bbox;
} else {