aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpu')
-rw-r--r--tools/gpu/ProxyUtils.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gpu/ProxyUtils.cpp b/tools/gpu/ProxyUtils.cpp
index bba17de939..64af648068 100644
--- a/tools/gpu/ProxyUtils.cpp
+++ b/tools/gpu/ProxyUtils.cpp
@@ -18,6 +18,10 @@ sk_sp<GrTextureProxy> MakeTextureProxyFromData(GrContext* context, bool isRT, in
GrColorType ct, GrSRGBEncoded srgbEncoded,
GrSurfaceOrigin origin, const void* data,
size_t rowBytes) {
+ if (context->contextPriv().abandoned()) {
+ return nullptr;
+ }
+
auto config = GrColorTypeToPixelConfig(ct, srgbEncoded);
sk_sp<GrTextureProxy> proxy;
if (kBottomLeft_GrSurfaceOrigin == origin) {