diff options
-rw-r--r-- | gpu/src/GrDrawTarget.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gpu/src/GrDrawTarget.cpp b/gpu/src/GrDrawTarget.cpp index 1dd750de24..7efe3815e6 100644 --- a/gpu/src/GrDrawTarget.cpp +++ b/gpu/src/GrDrawTarget.cpp @@ -658,8 +658,10 @@ void GrDrawTarget::drawIndexed(GrPrimitiveType type, int startVertex, GrCrash("Indexed drawing outside valid index range."); } #endif - this->onDrawIndexed(type, startVertex, startIndex, - vertexCount, indexCount); + if (indexCount > 0) { + this->onDrawIndexed(type, startVertex, startIndex, + vertexCount, indexCount); + } } @@ -686,7 +688,9 @@ void GrDrawTarget::drawNonIndexed(GrPrimitiveType type, GrCrash("Non-indexed drawing outside valid vertex range."); } #endif - this->onDrawNonIndexed(type, startVertex, vertexCount); + if (vertexCount > 0) { + this->onDrawNonIndexed(type, startVertex, vertexCount); + } } //////////////////////////////////////////////////////////////////////////////// |