Index: include/gpu/GrContext.h |
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h |
index d8d061a19efc87f8e52e3639462790eaec68c242..bbba977d70dedbf0052d66b7f9c101e97e7d2b0e 100644 |
--- a/include/gpu/GrContext.h |
+++ b/include/gpu/GrContext.h |
@@ -700,7 +700,7 @@ public: |
AutoClip(GrContext* context, InitialClip SkDEBUGCODE(initialState)) |
: fContext(context) { |
SkASSERT(kWideOpen_InitialClip == initialState); |
- fNewClipData.fClipStack = &fNewClipStack; |
+ fNewClipData.fClipStack.reset(SkRef(&fNewClipStack)); |
fOldClip = context->getClip(); |
context->setClip(&fNewClipData); |
@@ -709,7 +709,7 @@ public: |
AutoClip(GrContext* context, const SkRect& newClipRect) |
: fContext(context) |
, fNewClipStack(newClipRect) { |
- fNewClipData.fClipStack = &fNewClipStack; |
+ fNewClipData.fClipStack.reset(SkRef(&fNewClipStack)); |
fOldClip = fContext->getClip(); |
fContext->setClip(&fNewClipData); |