GrTessellator: add a null-check for a clusterfuzz test case.
[Cherry-pick of 90732fd36e22cbf0699ab1d0f08eb7e247dda30b to M58 branch.]
BUG=695696
Change-Id: I1c001316721b3c042cff115c905ff0d2c2698ac0
Reviewed-on: https://skia-review.googlesource.com/9053
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-on: https://skia-review.googlesource.com/9501
Reviewed-by: Stephen White <senorblanco@chromium.org>
diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTessellator.cpp
index 3271b12..b6d3147 100644
--- a/src/gpu/GrTessellator.cpp
+++ b/src/gpu/GrTessellator.cpp
@@ -792,7 +792,7 @@
}
void find_enclosing_edges(Vertex* v, EdgeList* edges, Edge** left, Edge** right) {
- if (v->fFirstEdgeAbove) {
+ if (v->fFirstEdgeAbove && v->fLastEdgeAbove) {
*left = v->fFirstEdgeAbove->fLeft;
*right = v->fLastEdgeAbove->fRight;
return;