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

Unified Diff: src/core/SkPathRef.cpp

Issue 2061833005: disallow -4 pointer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPathRef.cpp
diff --git a/src/core/SkPathRef.cpp b/src/core/SkPathRef.cpp
index 74f3a220ce538bbe5e07873161ed0acf9acd4214..8a90b875ea48934c9ad1acf89a885f1747fc2282 100644
--- a/src/core/SkPathRef.cpp
+++ b/src/core/SkPathRef.cpp
@@ -619,7 +619,10 @@ void SkPathRef::Iter::setPathRef(const SkPathRef& path) {
fPts = path.points();
fVerbs = path.verbs();
fVerbStop = path.verbsMemBegin();
- fConicWeights = path.conicWeights() - 1; // begin one behind
+ fConicWeights = path.conicWeights();
+ if (fConicWeights) {
+ fConicWeights -= 1; // begin one behind
+ }
}
uint8_t SkPathRef::Iter::next(SkPoint pts[4]) {
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698