Index: gm/convexpolyeffect.cpp |
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp |
index 0a3be28c73a81146383fb02a0bfd2d949020e944..f3335c94e5926db55463f2690f529a5916f170d3 100644 |
--- a/gm/convexpolyeffect.cpp |
+++ b/gm/convexpolyeffect.cpp |
@@ -62,6 +62,11 @@ private: |
&vertexBuffer, |
&firstVertex); |
+ if (!vertices || !batchTarget->quadIndexBuffer()) { |
+ SkDebugf("Could not allocate buffers\n"); |
+ return; |
+ } |
+ |
SkASSERT(vertexStride == sizeof(SkPoint)); |
SkPoint* verts = reinterpret_cast<SkPoint*>(vertices); |