aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorFilippos Karapetis2012-07-04 02:20:39 +0300
committerFilippos Karapetis2012-07-04 02:21:13 +0300
commit243ea1fa290a919d5f0a07094782465f0ba08d7e (patch)
treed79dad47f0f36953421bed22174b68aae6836842 /engines/sci/graphics
parent5d3e22ae4f5fcf6c7717eb9e50767b3fbb5a10f8 (diff)
downloadscummvm-rg350-243ea1fa290a919d5f0a07094782465f0ba08d7e.tar.gz
scummvm-rg350-243ea1fa290a919d5f0a07094782465f0ba08d7e.tar.bz2
scummvm-rg350-243ea1fa290a919d5f0a07094782465f0ba08d7e.zip
SCI: Add a check for invalid clip rectangles
Happens in QFG4, when starting a battle
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/frameout.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 450460023c..5b857fe3d8 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -722,6 +722,9 @@ void GfxFrameout::kernelFrameout() {
translatedClipRect = clipRect;
translatedClipRect.translate(it->upscaledPlaneRect.left, it->upscaledPlaneRect.top);
} else {
+ // QFG4 passes invalid rectangles when a battle is starting
+ if (!clipRect.isValidRect())
+ continue;
clipRect.clip(it->planeClipRect);
translatedClipRect = clipRect;
translatedClipRect.translate(it->planeRect.left, it->planeRect.top);