aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar Adrienne Walker <enne@chromium.org>2018-04-25 15:44:02 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-25 23:15:30 +0000
commit890a8cc60478ca3d54645ee15e6d3389015bf38e (patch)
tree1a34730ee8516858c3d10440a28a594ee4aaa3f0 /src/gpu
parent580aee2fa4a57bf8208498fbc23acea04e16e092 (diff)
Fix GrAAConvexTessellator trying to fan a 0 point ring
This prevents accessing off an empty array. Bug: chromium:830038 Change-Id: I5ad019d56659c667564efc498dcef7fb112da4af Reviewed-on: https://skia-review.googlesource.com/123800 Commit-Queue: Adrienne Walker <enne@chromium.org> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Adrienne Walker <enne@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/ops/GrAAConvexTessellator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/ops/GrAAConvexTessellator.cpp b/src/gpu/ops/GrAAConvexTessellator.cpp
index 05fe2eaf7e..72df654c51 100644
--- a/src/gpu/ops/GrAAConvexTessellator.cpp
+++ b/src/gpu/ops/GrAAConvexTessellator.cpp
@@ -634,7 +634,7 @@ void GrAAConvexTessellator::createOuterRing(const Ring& previousRing, SkScalar o
// Something went wrong in the creation of the next ring. If we're filling the shape, just go ahead
// and fan it.
void GrAAConvexTessellator::terminate(const Ring& ring) {
- if (fStyle != SkStrokeRec::kStroke_Style) {
+ if (fStyle != SkStrokeRec::kStroke_Style && ring.numPts() > 0) {
this->fanRing(ring);
}
}