Index: gm/beziereffects.cpp |
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp |
index 45c6341848ee09e73f8103a3e31c9203e8da9dc8..d86a8b8163ace9eff83a5fd1df320ba361d719da 100644 |
--- a/gm/beziereffects.cpp |
+++ b/gm/beziereffects.cpp |
@@ -76,6 +76,11 @@ private: |
&vertexBuffer, |
&firstVertex); |
+ if (!vertices || !batchTarget->quadIndexBuffer()) { |
+ SkDebugf("Could not allocate buffers\n"); |
+ return; |
+ } |
+ |
SkASSERT(vertexStride == sizeof(Vertex)); |
Vertex* verts = reinterpret_cast<Vertex*>(vertices); |
@@ -478,6 +483,11 @@ private: |
&vertexBuffer, |
&firstVertex); |
+ if (!vertices || !batchTarget->quadIndexBuffer()) { |
+ SkDebugf("Could not allocate buffers\n"); |
+ return; |
+ } |
+ |
SkASSERT(vertexStride == sizeof(Vertex)); |
Vertex* verts = reinterpret_cast<Vertex*>(vertices); |