Index: src/effects/SkMatrixConvolutionImageFilter.cpp |
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp |
index 3c9fc87787799611e07e657708e6c0b3ee6de447..be1dcb4ce970e9ad859bcc6f8fffb4fe9bb795c8 100644 |
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp |
+++ b/src/effects/SkMatrixConvolutionImageFilter.cpp |
@@ -153,6 +153,9 @@ void SkMatrixConvolutionImageFilter::filterPixels(const SkBitmap& src, |
SkBitmap* result, |
const SkIRect& rect, |
const SkIRect& bounds) const { |
+ if (rect.isEmpty()) { |
+ return; |
+ } |
for (int y = rect.fTop; y < rect.fBottom; ++y) { |
SkPMColor* dptr = result->getAddr32(rect.fLeft - bounds.fLeft, y - bounds.fTop); |
for (int x = rect.fLeft; x < rect.fRight; ++x) { |