Index: src/gpu/GrOvalRenderer.cpp |
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp |
index fc8c18410cad0f76d20ed4226a2b8ab2317f3880..20ae77cb5244a258bec1de34730772d4f2f2d33f 100644 |
--- a/src/gpu/GrOvalRenderer.cpp |
+++ b/src/gpu/GrOvalRenderer.cpp |
@@ -762,6 +762,11 @@ public: |
&vertexBuffer, |
&firstVertex); |
+ if (!vertices || !batchTarget->quadIndexBuffer()) { |
+ SkDebugf("Could not allocate buffers\n"); |
+ return; |
+ } |
+ |
CircleVertex* verts = reinterpret_cast<CircleVertex*>(vertices); |
for (int i = 0; i < instanceCount; i++) { |
@@ -1012,6 +1017,11 @@ public: |
&vertexBuffer, |
&firstVertex); |
+ if (!vertices || !batchTarget->quadIndexBuffer()) { |
+ SkDebugf("Could not allocate buffers\n"); |
+ return; |
+ } |
+ |
EllipseVertex* verts = reinterpret_cast<EllipseVertex*>(vertices); |
for (int i = 0; i < instanceCount; i++) { |
@@ -1303,6 +1313,11 @@ public: |
&vertexBuffer, |
&firstVertex); |
+ if (!vertices || !batchTarget->quadIndexBuffer()) { |
+ SkDebugf("Could not allocate buffers\n"); |
+ return; |
+ } |
+ |
DIEllipseVertex* verts = reinterpret_cast<DIEllipseVertex*>(vertices); |
for (int i = 0; i < instanceCount; i++) { |
@@ -1692,6 +1707,11 @@ public: |
&vertexBuffer, |
&firstVertex); |
+ if (!vertices) { |
+ SkDebugf("Could not allocate vertices\n"); |
+ return; |
+ } |
+ |
CircleVertex* verts = reinterpret_cast<CircleVertex*>(vertices); |
for (int i = 0; i < instanceCount; i++) { |
@@ -1896,6 +1916,11 @@ public: |
&vertexBuffer, |
&firstVertex); |
+ if (!vertices) { |
+ SkDebugf("Could not allocate vertices\n"); |
+ return; |
+ } |
+ |
EllipseVertex* verts = reinterpret_cast<EllipseVertex*>(vertices); |
for (int i = 0; i < instanceCount; i++) { |