Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: src/gpu/GrAAConvexPathRenderer.cpp

Issue 979343002: handle null vertex or index buffers in batch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/convexpolyeffect.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 3ab8af5c374b21f53d65a3cd36eeb24bb5594254..317f9a0f8d037c93755b631ff9a0c15b4fa02ef1 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -784,6 +784,11 @@ public:
&vertexBuffer,
&firstVertex);
+ if (!vertices) {
+ SkDebugf("Could not allocate vertices\n");
+ return;
+ }
+
const GrIndexBuffer* indexBuffer;
int firstIndex;
@@ -791,6 +796,11 @@ public:
&indexBuffer,
&firstIndex);
+ if (!indices) {
+ SkDebugf("Could not allocate indices\n");
+ return;
+ }
+
QuadVertex* verts = reinterpret_cast<QuadVertex*>(vertices);
uint16_t* idxs = reinterpret_cast<uint16_t*>(indices);
« no previous file with comments | « gm/convexpolyeffect.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698