| Index: src/gpu/GrContext.cpp
|
| diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
|
| index ac44644de83c32f0d87f9b20a4cddbd6e1939cc3..78f29e73bc713d773ce27ce94164244316b83c25 100755
|
| --- a/src/gpu/GrContext.cpp
|
| +++ b/src/gpu/GrContext.cpp
|
| @@ -567,6 +567,11 @@ public:
|
| &vertexBuffer,
|
| &firstVertex);
|
|
|
| + if (!vertices) {
|
| + SkDebugf("Could not allocate vertices\n");
|
| + return;
|
| + }
|
| +
|
| SkPoint* vertex = reinterpret_cast<SkPoint*>(vertices);
|
|
|
| GrPrimitiveType primType;
|
| @@ -900,6 +905,11 @@ public:
|
| &vertexBuffer,
|
| &firstVertex);
|
|
|
| + if (!vertices) {
|
| + SkDebugf("Could not allocate vertices\n");
|
| + return;
|
| + }
|
| +
|
| const GrIndexBuffer* indexBuffer;
|
| int firstIndex;
|
|
|
| @@ -908,6 +918,11 @@ public:
|
| indices = batchTarget->indexPool()->makeSpace(this->indexCount(),
|
| &indexBuffer,
|
| &firstIndex);
|
| +
|
| + if (!indices) {
|
| + SkDebugf("Could not allocate indices\n");
|
| + return;
|
| + }
|
| }
|
|
|
| int indexOffset = 0;
|
|
|