[Scummvm-git-logs] scummvm master -> 91cbd8fc53bd91eadff62df673a5efdc3f21dd6e

whoozle vladimir.menshakov at gmail.com
Sat Mar 6 20:57:46 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
91cbd8fc53 GRAPHICS: Fix crash in blitFromInner if destRect is empty


Commit: 91cbd8fc53bd91eadff62df673a5efdc3f21dd6e
    https://github.com/scummvm/scummvm/commit/91cbd8fc53bd91eadff62df673a5efdc3f21dd6e
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2021-03-06T20:57:27Z

Commit Message:
GRAPHICS: Fix crash in blitFromInner if destRect is empty

Changed paths:
    graphics/managed_surface.cpp


diff --git a/graphics/managed_surface.cpp b/graphics/managed_surface.cpp
index dc1b1b1b4f..1b14bac22d 100644
--- a/graphics/managed_surface.cpp
+++ b/graphics/managed_surface.cpp
@@ -246,6 +246,10 @@ void ManagedSurface::blitFrom(const ManagedSurface &src, const Common::Rect &src
 
 void ManagedSurface::blitFromInner(const Surface &src, const Common::Rect &srcRect,
 		const Common::Rect &destRect, const uint32 *srcPalette) {
+
+	if (destRect.isEmpty())
+		return;
+
 	const int scaleX = SCALE_THRESHOLD * srcRect.width() / destRect.width();
 	const int scaleY = SCALE_THRESHOLD * srcRect.height() / destRect.height();
 




More information about the Scummvm-git-logs mailing list