Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: src/core/SkFilterShader.cpp

Issue 279573002: return null if subshader fails (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698