Fail draws when can't get geom into vb/ib.
Review URL: http://codereview.appspot.com/4837059/
git-svn-id: http://skia.googlecode.com/svn/trunk@2053 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrInOrderDrawBuffer.cpp b/gpu/src/GrInOrderDrawBuffer.cpp
index a8eb1f5..39bf275 100644
--- a/gpu/src/GrInOrderDrawBuffer.cpp
+++ b/gpu/src/GrInOrderDrawBuffer.cpp
@@ -87,6 +87,10 @@
bool appendToPreviousDraw = false;
GrVertexLayout layout = GetRectVertexLayout(stageEnableBitfield, srcRects);
AutoReleaseGeometry geo(this, layout, 4, 0);
+ if (!geo.succeeded()) {
+ GrPrintf("Failed to get space for vertices!\n");
+ return;
+ }
AutoViewMatrixRestore avmr(this);
GrMatrix combinedMatrix = this->getViewMatrix();
this->setViewMatrix(GrMatrix::I());