if fBitmap is still NULL, return false
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 22 Oct 2013 16:17:29 +0000 (16:17 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 22 Oct 2013 16:17:29 +0000 (16:17 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@11908 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkBitmapProcState.cpp

index c50266f017328c4adfddc28502281a32b098c644..a535f086ea642921db8883325761b8af223951a1 100644 (file)
@@ -343,8 +343,11 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
             return false;
         }
     }
-
-    SkASSERT(fBitmap);
+    // The above logic should have always assigned fBitmap, but in case it
+    // didn't, we check for that now...
+    if (NULL == fBitmap) {
+        return false;
+    }
 
     bool trivialMatrix = (fInvMatrix.getType() & ~SkMatrix::kTranslate_Mask) == 0;
     bool clampClamp = SkShader::kClamp_TileMode == fTileModeX &&