aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-22 16:17:29 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-22 16:17:29 +0000
commitc294a97842d6d24b220e7512a8043b93554ed40e (patch)
tree0f401b0873889f4452f3d6ce5974c2572ce5f00a /src
parent8c908273bb21e3f4141c86312f8a3ef5f90ebe9f (diff)
if fBitmap is still NULL, return false
git-svn-id: http://skia.googlecode.com/svn/trunk@11908 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/core/SkBitmapProcState.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp
index c50266f017..a535f086ea 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -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 &&