diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index 59b7771ac4..86bb7c900f 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -315,6 +315,9 @@ void SkScalerContext::getMetrics(SkGlyph* glyph) { src.fImage = NULL; // only want the bounds from the filter if (fMaskFilter->filterMask(&dst, src, matrix, NULL)) { + if (dst.fBounds.isEmpty() || !dst.fBounds.is16Bit()) { + goto SK_ERROR; + } SkASSERT(dst.fImage == NULL); glyph->fLeft = dst.fBounds.fLeft; glyph->fTop = dst.fBounds.fTop;