aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/convexpolyeffect.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-03-05 14:33:41 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-05 14:33:41 -0800
commit4b31de8328bbf3ee789157ae1dc6fe7cc74c796a (patch)
tree0fd504b5a981a14bebc3918bbbd877dbd141b26b /gm/convexpolyeffect.cpp
parentcc4d6673a942db11a678b572cf0dc5fca2b97f8a (diff)
handle null vertex or index buffers in batch
Diffstat (limited to 'gm/convexpolyeffect.cpp')
-rw-r--r--gm/convexpolyeffect.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index 0a3be28c73..f3335c94e5 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);