Index: gm/texdata.cpp |
diff --git a/gm/texdata.cpp b/gm/texdata.cpp |
index 13a1c2a6c2275e56e91386e748956cd161f94bc5..1a807c7b9bd5a57d171af1fcd9989ff3bb2b1a45 100644 |
--- a/gm/texdata.cpp |
+++ b/gm/texdata.cpp |
@@ -39,7 +39,7 @@ protected: |
void onDraw(SkCanvas* canvas) override { |
GrRenderTarget* target = canvas->internal_private_accessTopLayerRenderTarget(); |
GrContext* ctx = canvas->getGrContext(); |
- GrDrawContext* drawContext = ctx ? ctx->drawContext() : nullptr; |
+ SkAutoTUnref<GrDrawContext> drawContext(ctx ? ctx->drawContext() : nullptr); |
if (drawContext && target) { |
SkAutoTArray<SkPMColor> gTextureData((2 * S) * (2 * S)); |
static const int stride = 2 * S; |