small bug fix for batch asserts
BUG=skia:
Review URL: https://codereview.chromium.org/969043002
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 1ff018d..d89dd43 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -395,7 +395,7 @@
}
// Check if there is a Batch Draw we can batch with
- if (Cmd::kDrawBatch_Cmd != fCmdBuffer.back().type()) {
+ if (Cmd::kDrawBatch_Cmd != fCmdBuffer.back().type() || !fDrawBatch) {
fDrawBatch = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, DrawBatch, (batch, &fBatchTarget));
this->recordTraceMarkersIfNecessary(fDrawBatch);
return;