diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index c7b69043353..0c06ef7f48d 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -1171,9 +1171,12 @@ void GraphicsManager::displayDirtyRects() { unlockScreen(); } - byte *srcP = _videoPtr + WinScan * dstRect.top + (dstRect.left * 2); - g_system->copyRectToScreen(srcP, WinScan, dstRect.left, dstRect.top, - dstRect.width(), dstRect.height()); + // If it's a valid rect, then copy it over + if (dstRect.isValidRect() && dstRect.width() > 0 && dstRect.height() > 0) { + byte *srcP = _videoPtr + WinScan * dstRect.top + (dstRect.left * 2); + g_system->copyRectToScreen(srcP, WinScan, dstRect.left, dstRect.top, + dstRect.width(), dstRect.height()); + } } unlockScreen();