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

Unified Diff: src/effects/SkDisplacementMapEffect.cpp

Issue 116773002: Fixed more fuzzer issues (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Changed isAvailable for validateAvailable Created 7 years 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
Index: src/effects/SkDisplacementMapEffect.cpp
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index f43287c4d7fcfaa0a3bc9c949a7c78a2f74e1ad6..8fc4c86ec5bad966a3407c81f0cdadd233a56b90 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -188,7 +188,7 @@ bool SkDisplacementMapEffect::onFilterImage(Proxy* proxy,
SkImageFilter* displacementInput = getDisplacementInput();
SkASSERT(NULL != displacementInput);
if ((colorInput && !colorInput->filterImage(proxy, src, ctm, &color, offset)) ||
- !displacementInput->filterImage(proxy, src, ctm, &displ, offset)) {
+ !displacementInput || !displacementInput->filterImage(proxy, src, ctm, &displ, offset)) {
Stephen White 2013/12/18 00:01:14 I don't think it should abort on a NULL displaceme
return false;
}
if ((displ.config() != SkBitmap::kARGB_8888_Config) ||

Powered by Google App Engine
This is Rietveld 408576698