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

Unified Diff: src/core/SkPath.cpp

Issue 1709023002: fix asan error deref-ing null ptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPath.cpp
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 4c2f89730c84f9e109f6f8c8ae5f55b584c9eb9a..10e80a47a33804476650c6a99c9d0248a609f94a 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -214,6 +214,9 @@ bool SkPath::interpolate(const SkPath& ending, SkScalar weight, SkPath* out) con
if (verbCount != ending.fPathRef->countVerbs()) {
return false;
}
+ if (!verbCount) {
+ return true;
+ }
out->reset();
out->addPath(*this);
fPathRef->interpolate(*ending.fPathRef, weight, out->fPathRef);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698