Index: src/effects/SkMorphologyImageFilter.cpp |
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp |
index 6abd1fc2365eac1e99f16d43632940411cd5a638..b592fd01b048a981e7dadad7257726d3ae554e13 100644 |
--- a/src/effects/SkMorphologyImageFilter.cpp |
+++ b/src/effects/SkMorphologyImageFilter.cpp |
@@ -551,7 +551,7 @@ sk_sp<SkSpecialImage> SkMorphologyImageFilter::filterImageGeneric(bool dilate, |
} |
#if SK_SUPPORT_GPU |
- if (input->peekTexture()) { |
+ if (input->peekTexture() && input->peekTexture()->getContext()) { |
auto type = dilate ? GrMorphologyEffect::kDilate_MorphologyType |
: GrMorphologyEffect::kErode_MorphologyType; |
sk_sp<SkSpecialImage> result(apply_morphology(input.get(), srcBounds, type, |