diff options
Diffstat (limited to 'src/pdf/SkPDFDevice.cpp')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index 7e85afdcde..733a6128b9 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -491,6 +491,8 @@ static inline SkBitmap makeContentBitmap(const SkISize& contentSize, drawingSize.set(SkIntToScalar(contentSize.fWidth), SkIntToScalar(contentSize.fHeight)); if (!initialTransform->invert(&inverse)) { + // This shouldn't happen, initial transform should be invertible. + SkASSERT(false); inverse.reset(); } inverse.mapVectors(&drawingSize, 1); @@ -603,7 +605,7 @@ void SkPDFDevice::internalDrawPaint(const SkPaint& paint, totalTransform.preConcat(contentEntry->fState.fMatrix); SkMatrix inverse; if (!totalTransform.invert(&inverse)) { - inverse.reset(); + return; } inverse.mapRect(&bbox); |