diff options
author | 2014-05-08 19:22:52 +0000 | |
---|---|---|
committer | 2014-05-08 19:22:52 +0000 | |
commit | a69bda8d3c0901aaa4fa683dcd2adda5d6aa428b (patch) | |
tree | 7fe7d9c0ecdb8a079ebcac780345e69b793f7a48 /src/core | |
parent | 888e4687d96b6af5b5c0efbcf05fcdc010ea8aa2 (diff) |
return null if subshader fails
TBR=scroggo@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/279573002
git-svn-id: http://skia.googlecode.com/svn/trunk@14656 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkFilterShader.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/SkFilterShader.cpp b/src/core/SkFilterShader.cpp index 5094706ea7..0c92d4c3e3 100644 --- a/src/core/SkFilterShader.cpp +++ b/src/core/SkFilterShader.cpp @@ -58,8 +58,9 @@ uint32_t SkFilterShader::FilterShaderContext::getFlags() const { SkShader::Context* SkFilterShader::onCreateContext(const ContextRec& rec, void* storage) const { char* shaderContextStorage = (char*)storage + sizeof(FilterShaderContext); SkShader::Context* shaderContext = fShader->createContext(rec, shaderContextStorage); - SkASSERT(shaderContext); - + if (NULL == shaderContext) { + return NULL; + } return SkNEW_PLACEMENT_ARGS(storage, FilterShaderContext, (*this, shaderContext, rec)); } |