Index: src/core/SkNormalSource.cpp |
diff --git a/src/core/SkNormalSource.cpp b/src/core/SkNormalSource.cpp |
index 52bb4adaa70092504a58bc4f17ecd825f6b4988a..a69367921263ccdd8d1f2f793d35bc3923c6deef 100644 |
--- a/src/core/SkNormalSource.cpp |
+++ b/src/core/SkNormalSource.cpp |
@@ -181,9 +181,11 @@ sk_sp<GrFragmentProcessor> NormalMapSourceImpl::asFragmentProcessor( |
const SkMatrix *localMatrix, |
SkFilterQuality filterQuality, |
SkSourceGammaTreatment gammaTreatment) const { |
- |
sk_sp<GrFragmentProcessor> mapFP = fMapShader->asFragmentProcessor(context, viewM, |
localMatrix, filterQuality, gammaTreatment); |
+ if (!mapFP) { |
+ return nullptr; |
+ } |
return sk_make_sp<NormalMapFP>(std::move(mapFP), fInvCTM); |
} |