From 9c16d1e766b60b2d87e2050298a3aa321f394648 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Mon, 19 Dec 2016 11:16:36 -0500 Subject: [PATCH] handle empty contours in a couple more places R=kjlubick@google.com BUG=skia:6061 Change-Id: I5b465f1495f80a5ac44253cadf4afd7f509fa75b Reviewed-on: https://skia-review.googlesource.com/6268 Reviewed-by: Kevin Lubick Commit-Queue: Cary Clark --- src/pathops/SkOpContour.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pathops/SkOpContour.h b/src/pathops/SkOpContour.h index 03230e1e90..a7a6beefc7 100644 --- a/src/pathops/SkOpContour.h +++ b/src/pathops/SkOpContour.h @@ -292,6 +292,9 @@ public: void resetReverse() { SkOpContour* next = this; do { + if (!next->count()) { + continue; + } next->fCcw = -1; next->fReverse = false; } while ((next = next->next())); @@ -405,6 +408,9 @@ public: void joinAllSegments() { SkOpContour* next = this; do { + if (!next->count()) { + continue; + } next->joinSegments(); } while ((next = next->next())); }