| Index: src/effects/SkMorphologyImageFilter.cpp
|
| diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
|
| index 49df654316d8637b15e14397e270151875492f2a..67769f29b93c2efe2468071133ec7ceb7212e0ca 100644
|
| --- a/src/effects/SkMorphologyImageFilter.cpp
|
| +++ b/src/effects/SkMorphologyImageFilter.cpp
|
| @@ -506,6 +506,9 @@ bool apply_morphology(const SkBitmap& input,
|
|
|
| if (radius.fWidth > 0) {
|
| GrAutoScratchTexture ast(context, desc);
|
| + if (NULL == ast.texture()) {
|
| + return false;
|
| + }
|
| GrContext::AutoRenderTarget art(context, ast.texture()->asRenderTarget());
|
| apply_morphology_pass(context, src, srcRect, dstRect, radius.fWidth,
|
| morphType, Gr1DKernelEffect::kX_Direction);
|
| @@ -519,6 +522,9 @@ bool apply_morphology(const SkBitmap& input,
|
| }
|
| if (radius.fHeight > 0) {
|
| GrAutoScratchTexture ast(context, desc);
|
| + if (NULL == ast.texture()) {
|
| + return false;
|
| + }
|
| GrContext::AutoRenderTarget art(context, ast.texture()->asRenderTarget());
|
| apply_morphology_pass(context, src, srcRect, dstRect, radius.fHeight,
|
| morphType, Gr1DKernelEffect::kY_Direction);
|
|
|