OSDN Git Service

fix DDMS crash
authorTim Murray <timmurray@google.com>
Mon, 14 Jan 2013 22:09:33 +0000 (14:09 -0800)
committerTim Murray <timmurray@google.com>
Mon, 14 Jan 2013 22:09:33 +0000 (14:09 -0800)
Change-Id: Ic5edd3d9367db8570523e1380c3e6edfabeec2c0

vm/alloc/DdmHeap.cpp

index 45b0a26..0f1fc31 100644 (file)
@@ -189,6 +189,10 @@ struct HeapChunkContext {
 
 static void flush_hpsg_chunk(HeapChunkContext *ctx)
 {
+    if (ctx->pieceLenField == NULL && ctx->needHeader) {
+        /* Already flushed */
+        return;
+    }
     /* Patch the "length of piece" field.
      */
     assert(ctx->buf <= ctx->pieceLenField &&