mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
GRAPHICS: Fix crash in blitFromInner if destRect is empty
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user