be sure to allocate space for kDone_DrawOp before we write it (thanks Yang)



git-svn-id: http://skia.googlecode.com/svn/trunk@1831 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
index fa93113..f56fe27 100644
--- a/src/pipe/SkGPipeWrite.cpp
+++ b/src/pipe/SkGPipeWrite.cpp
@@ -84,8 +84,10 @@
 
     void finish() {
         if (!fDone) {
-            this->writeOp(kDone_DrawOp);
-            this->doNotify();
+            if (this->needOpBytes()) {
+                this->writeOp(kDone_DrawOp);
+                this->doNotify();
+            }
             fDone = true;
         }
     }