diff options
author | 2015-03-05 14:33:41 -0800 | |
---|---|---|
committer | 2015-03-05 14:33:41 -0800 | |
commit | 4b31de8328bbf3ee789157ae1dc6fe7cc74c796a (patch) | |
tree | 0fd504b5a981a14bebc3918bbbd877dbd141b26b /gm/convexpolyeffect.cpp | |
parent | cc4d6673a942db11a678b572cf0dc5fca2b97f8a (diff) |
handle null vertex or index buffers in batch
BUG=skia:
Review URL: https://codereview.chromium.org/979343002
Diffstat (limited to 'gm/convexpolyeffect.cpp')
-rw-r--r-- | gm/convexpolyeffect.cpp | 5 |
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); |