diff options
author | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-11-01 12:15:12 +0000 |
---|---|---|
committer | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-11-01 12:15:12 +0000 |
commit | dfef456f183713da8c05fe5f3d252736a7776c8c (patch) | |
tree | 82a6e178b304838e1a5e26d77c9476c547128f6e /src/core/SkPathMeasure.cpp | |
parent | f3dc199c0b18e35ac8de4075ecbede7a484f1b0d (diff) |
Fix asserts in SkPathMeasure to honor documented API
Review URL: https://codereview.appspot.com/6822061
git-svn-id: http://skia.googlecode.com/svn/trunk@6232 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPathMeasure.cpp')
-rw-r--r-- | src/core/SkPathMeasure.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp index 8b1ec2d7f8..436753e4a1 100644 --- a/src/core/SkPathMeasure.cpp +++ b/src/core/SkPathMeasure.cpp @@ -418,8 +418,7 @@ const SkPathMeasure::Segment* SkPathMeasure::distanceToSegment( bool SkPathMeasure::getPosTan(SkScalar distance, SkPoint* pos, SkVector* tangent) { - SkASSERT(fPath); - if (fPath == NULL) { + if (NULL == fPath) { return false; } @@ -446,6 +445,10 @@ bool SkPathMeasure::getPosTan(SkScalar distance, SkPoint* pos, bool SkPathMeasure::getMatrix(SkScalar distance, SkMatrix* matrix, MatrixFlags flags) { + if (NULL == fPath) { + return false; + } + SkPoint position; SkVector tangent; |