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

Unified Diff: src/pathops/SkOpCoincidence.cpp

Issue 1507803002: fix coincident fuzzer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 | src/pathops/SkOpSegment.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 87bb91386975f9d3cb13c9febad906b68c319d02..f56847787c2c146b6da1b43e50636f0bd6f8f7e9 100755
--- a/src/pathops/SkOpCoincidence.cpp
+++ b/src/pathops/SkOpCoincidence.cpp
@@ -110,11 +110,17 @@ bool SkOpCoincidence::addExpanded(SkChunkAlloc* allocator
if (startPart < oStartPart) {
double newT = oStartPtT->fT + oStartRange * startPart;
newPt = oStart->segment()->addT(newT, SkOpSegment::kAllowAlias, allocator);
+ if (!newPt) {
+ return false;
+ }
newPt->fPt = test->pt();
test->ptT()->addOpp(newPt);
} else {
double newT = startPtT->fT + startRange * oStartPart;
newPt = start->segment()->addT(newT, SkOpSegment::kAllowAlias, allocator);
+ if (!newPt) {
+ return false;
+ }
newPt->fPt = oTest->pt();
oTest->ptT()->addOpp(newPt);
}
« no previous file with comments | « no previous file | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698