GPU: add failure checks for the scratch textures used in Gaussian blur.
https://codereview.appspot.com/6744047/
On behalf of senorblanco
git-svn-id: http://skia.googlecode.com/svn/trunk@6014 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 5506d1a..dadb9a0 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -859,6 +859,9 @@
bool isNormalBlur = blurType == SkMaskFilter::kNormal_BlurType;
blurTexture.reset(context->gaussianBlur(pathTexture, isNormalBlur,
srcRect, sigma, sigma));
+ if (NULL == blurTexture) {
+ return false;
+ }
if (!isNormalBlur) {
context->setIdentityMatrix();