Index: src/effects/gradients/SkGradientShader.cpp |
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp |
index d2b8bc30f858d3244d7076494ab9a2cbbabbe886..0f6599dc9a0c53508a66c35b5b3d9636f3b4de0a 100644 |
--- a/src/effects/gradients/SkGradientShader.cpp |
+++ b/src/effects/gradients/SkGradientShader.cpp |
@@ -1130,6 +1130,9 @@ GrGradientEffect::GrGradientEffect(GrContext* ctx, |
fTextureAccess.reset(fAtlas->getTexture(), params); |
} else { |
SkAutoTUnref<GrTexture> texture(GrRefCachedBitmapTexture(ctx, bitmap, ¶ms)); |
+ if (!texture) { |
+ return; |
+ } |
fCoordTransform.reset(kCoordSet, matrix, texture, params.filterMode()); |
fTextureAccess.reset(texture, params); |
fYCoord = SK_ScalarHalf; |