Index: src/core/SkSpecialImage.cpp |
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp |
index 2b371d6f747c06d97564d052625eb280e40052f5..b8eabc50bf577b4958b97675c997db323c27af4c 100644 |
--- a/src/core/SkSpecialImage.cpp |
+++ b/src/core/SkSpecialImage.cpp |
@@ -481,6 +481,10 @@ public: |
} |
sk_sp<SkSpecialSurface> onMakeSurface(const SkImageInfo& info) const override { |
+ if (!fTexture->getContext()) { |
+ return nullptr; |
+ } |
+ |
GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info, *fTexture->getContext()->caps()); |
desc.fFlags = kRenderTarget_GrSurfaceFlag; |