summaryrefslogtreecommitdiff
path: root/splash
diff options
context:
space:
mode:
Diffstat (limited to 'splash')
-rw-r--r--splash/Splash.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/splash/Splash.cc b/splash/Splash.cc
index d9983b07..b303cf2c 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -4875,6 +4875,9 @@ void Splash::scaleImageYuXuBilinear(SplashImageSource src, void *srcData,
Guchar *destPtr0, *destPtr, *destAlphaPtr0, *destAlphaPtr;
int i;
+ if (srcWidth < 1 || srcHeight < 1)
+ return;
+
// allocate buffers
srcBuf = (Guchar *)gmallocn(srcWidth+1, nComps); // + 1 pixel of padding
lineBuf1 = (Guchar *)gmallocn(scaledWidth, nComps);