Make reserveAndLockGeometry set index/vertex ptr to null if none requested. We are expecting this behavior in a caller and it seems reasonable.
git-svn-id: http://skia.googlecode.com/svn/trunk@1210 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrDrawTarget.cpp b/gpu/src/GrDrawTarget.cpp
index 1ac02f2..3810043 100644
--- a/gpu/src/GrDrawTarget.cpp
+++ b/gpu/src/GrDrawTarget.cpp
@@ -413,9 +413,13 @@
if (vertexCount) {
fGeometrySrc.fVertexSrc = kReserved_GeometrySrcType;
fGeometrySrc.fVertexLayout = vertexLayout;
+ } else if (NULL != vertices) {
+ *vertices = NULL;
}
if (indexCount) {
fGeometrySrc.fIndexSrc = kReserved_GeometrySrcType;
+ } else if (NULL != indices) {
+ *indices = NULL;
}
}
return fReservedGeometry.fLocked;