In GrBatchedTextContext, use GrSafeSetNull(), for more safeness!
authortomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 26 Jun 2012 17:57:03 +0000 (17:57 +0000)
committertomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 26 Jun 2012 17:57:03 +0000 (17:57 +0000)
http://codereview.appspot.com/6326058/

git-svn-id: http://skia.googlecode.com/svn/trunk@4345 2bbb7eff-a529-9590-31e7-b0007b416f81

src/gpu/GrBatchedTextContext.cpp

index 666d894..e94bf3d 100644 (file)
@@ -49,8 +49,7 @@ void GrBatchedTextContext::reset() {
     fDrawTarget->resetVertexSource();
     fMaxVertices = 0;
     fCurrVertex = 0;
-    fCurrTexture->unref();
-    fCurrTexture = NULL;
+    GrSafeSetNull(fCurrTexture);
 }
 
 void GrBatchedTextContext::prepareForGlyph(GrTexture* texture) {