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

Unified Diff: third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.cpp

Issue 1383013002: SVGFilterBuilder::getEffectById never return nullptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
Index: third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.cpp b/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.cpp
index 42d5fe2ca6f193a6e6d8fac56d4d06f732aaac0e..0137f9119baf6275f9e353c95b0376cbf3db4ecf 100644
--- a/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.cpp
@@ -101,9 +101,7 @@ PassRefPtrWillBeRawPtr<FilterEffect> SVGFEDisplacementMapElement::build(SVGFilte
{
FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->currentValue()->value()));
FilterEffect* input2 = filterBuilder->getEffectById(AtomicString(m_in2->currentValue()->value()));
-
- if (!input1 || !input2)
- return nullptr;
+ ASSERT(input1 && input2);
RefPtrWillBeRawPtr<FilterEffect> effect = FEDisplacementMap::create(filter, m_xChannelSelector->currentValue()->enumValue(), m_yChannelSelector->currentValue()->enumValue(), m_scale->currentValue()->value());
FilterEffectVector& inputEffects = effect->inputEffects();

Powered by Google App Engine
This is Rietveld 408576698