diff options
author | 2015-03-05 14:33:41 -0800 | |
---|---|---|
committer | 2015-03-05 14:33:41 -0800 | |
commit | 4b31de8328bbf3ee789157ae1dc6fe7cc74c796a (patch) | |
tree | 0fd504b5a981a14bebc3918bbbd877dbd141b26b /src/gpu/GrTessellatingPathRenderer.cpp | |
parent | cc4d6673a942db11a678b572cf0dc5fca2b97f8a (diff) |
handle null vertex or index buffers in batch
BUG=skia:
Review URL: https://codereview.chromium.org/979343002
Diffstat (limited to 'src/gpu/GrTessellatingPathRenderer.cpp')
-rw-r--r-- | src/gpu/GrTessellatingPathRenderer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrTessellatingPathRenderer.cpp b/src/gpu/GrTessellatingPathRenderer.cpp index 955e6c12e2..1170e1cc99 100644 --- a/src/gpu/GrTessellatingPathRenderer.cpp +++ b/src/gpu/GrTessellatingPathRenderer.cpp @@ -1515,6 +1515,12 @@ public: count, &vertexBuffer, &firstVertex); + + if (!vertices) { + SkDebugf("Could not allocate vertices\n"); + return; + } + LOG("emitting %d verts\n", count); void* end = polys_to_triangles(polys, fillType, vertices); int actualCount = static_cast<int>( |