diff options
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)); } |