From 243ea1fa290a919d5f0a07094782465f0ba08d7e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jul 2012 02:20:39 +0300 Subject: SCI: Add a check for invalid clip rectangles Happens in QFG4, when starting a battle --- engines/sci/graphics/frameout.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/sci/graphics') 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); -- cgit v1.2.3