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/include/GrDrawTarget.h b/gpu/include/GrDrawTarget.h
index 4431dc0..8196beb 100644
--- a/gpu/include/GrDrawTarget.h
+++ b/gpu/include/GrDrawTarget.h
@@ -938,10 +938,10 @@
int vertexCount,
int indexCount);
bool succeeded() const { return NULL != fTarget; }
- void* vertices() const { return fVertices; }
- void* indices() const { return fIndices; }
+ void* vertices() const { GrAssert(this->succeeded()); return fVertices; }
+ void* indices() const { GrAssert(this->succeeded()); return fIndices; }
GrPoint* positions() const {
- return static_cast<GrPoint*>(fVertices);
+ return static_cast<GrPoint*>(this->vertices());
}
private: