From 20b82524e7a7959803edd80cb0e6737629029ef2 Mon Sep 17 00:00:00 2001 From: Matt Sarett Date: Tue, 25 Apr 2017 09:28:18 -0400 Subject: [PATCH] SkMergeImageFilter: fModes might be nullptr Bug:714994 Change-Id: Ib8349e8fc0aba455472035c9a4e873a1720b73e0 Reviewed-on: https://skia-review.googlesource.com/14267 Reviewed-by: Matt Sarett Commit-Queue: Matt Sarett --- src/effects/SkMergeImageFilter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/effects/SkMergeImageFilter.cpp b/src/effects/SkMergeImageFilter.cpp index 546d66a797..e7c3f51df7 100644 --- a/src/effects/SkMergeImageFilter.cpp +++ b/src/effects/SkMergeImageFilter.cpp @@ -148,7 +148,7 @@ sk_sp SkMergeImageFilter::onMakeColorSpace(SkColorSpaceXformer* x SkSTArray<5, SkBlendMode> modes(this->countInputs()); for (int i = 0; i < this->countInputs(); i++) { inputs.push_back(this->getInput(i) ? this->getInput(i)->makeColorSpace(xformer) : nullptr); - modes.push_back((SkBlendMode) fModes[i]); + modes.push_back(fModes ? (SkBlendMode) fModes[i] : SkBlendMode::kSrcOver); } return SkMergeImageFilter::MakeN(inputs.begin(), this->countInputs(), modes.begin(), -- 2.34.1