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

Unified Diff: src/core/SkComposeShader.cpp

Issue 1185893007: fix null-pointer deref in SkComposeShader::toString() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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/SkComposeShader.cpp
diff --git a/src/core/SkComposeShader.cpp b/src/core/SkComposeShader.cpp
index 3c6623d29128e2be3b16fb9cfbc1f65df7b9ad32..c16d7ffc578f352f948d432934c68c41851c6623 100644
--- a/src/core/SkComposeShader.cpp
+++ b/src/core/SkComposeShader.cpp
@@ -202,8 +202,10 @@ void SkComposeShader::toString(SkString* str) const {
fShaderA->toString(str);
str->append(" ShaderB: ");
fShaderB->toString(str);
- str->append(" Xfermode: ");
- fMode->toString(str);
+ if (fMode) {
+ str->append(" Xfermode: ");
+ fMode->toString(str);
+ }
this->INHERITED::toString(str);
« 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