aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/images/SkScaledBitmapSampler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/images/SkScaledBitmapSampler.cpp b/src/images/SkScaledBitmapSampler.cpp
index fe425d58b1..788bcd4f1e 100644
--- a/src/images/SkScaledBitmapSampler.cpp
+++ b/src/images/SkScaledBitmapSampler.cpp
@@ -763,7 +763,9 @@ bool SkScaledBitmapSampler::sampleInterlaced(const uint8_t* SK_RESTRICT src, int
// of the destination bitmap's pixels, which is used to calculate the destination row
// each time this function is called.
const int dstY = srcYMinusY0 / fDY;
- SkASSERT(dstY < fScaledHeight);
+ if (dstY >= fScaledHeight) {
+ return false;
+ }
char* dstRow = fDstRow + dstY * fDstRowBytes;
return fRowProc(dstRow, src + fX0 * fSrcPixelSize, fScaledWidth,
fDX * fSrcPixelSize, dstY, fCTable);