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

Unified Diff: src/pathops/SkOpCoincidence.cpp

Issue 2058773002: add fail condition to addexpanded (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove debug change Created 4 years, 6 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 | « no previous file | tests/PathOpsBuilderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpCoincidence.cpp
diff --git a/src/pathops/SkOpCoincidence.cpp b/src/pathops/SkOpCoincidence.cpp
index 42ee5c6091198b4c1eab57c4a2df45d3c419b815..b72bd6cb37232fdce2534e4479e6107e177de538 100755
--- a/src/pathops/SkOpCoincidence.cpp
+++ b/src/pathops/SkOpCoincidence.cpp
@@ -136,6 +136,9 @@ bool SkOpCoincidence::addExpanded(SkChunkAlloc* allocator
}
if (oTest != oEnd) {
oTest = coin->fFlipped ? oTest->prev() : oTest->upCast()->next();
+ if (!oTest) {
+ return false;
+ }
}
}
} while ((coin = coin->fNext));
« no previous file with comments | « no previous file | tests/PathOpsBuilderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698