Index: src/core/SkFilterShader.cpp |
diff --git a/src/core/SkFilterShader.cpp b/src/core/SkFilterShader.cpp |
index 5094706ea784d56e8aafe3d398f72ff4894e74bd..0c92d4c3e3f90f4677d19a32044bb48c2f026754 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)); |
} |