Index: src/gpu/GrDefaultPathRenderer.cpp |
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp |
index 302aad77959732313360a26afffc6a61338af7ee..9619e2ad4487b3fc4d8242992e55e034af68ff2d 100644 |
--- a/src/gpu/GrDefaultPathRenderer.cpp |
+++ b/src/gpu/GrDefaultPathRenderer.cpp |
@@ -323,6 +323,11 @@ public: |
&vertexBuffer, |
&firstVertex); |
+ if (!vertices) { |
+ SkDebugf("Could not allocate vertices\n"); |
+ return; |
+ } |
+ |
const GrIndexBuffer* indexBuffer; |
int firstIndex; |
@@ -331,6 +336,11 @@ public: |
indices = batchTarget->indexPool()->makeSpace(maxIndices, |
&indexBuffer, |
&firstIndex); |
+ |
+ if (!indices) { |
+ SkDebugf("Could not allocate indices\n"); |
+ return; |
+ } |
} |
// fill buffers |