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
This commit is contained in:
djsollen@google.com 2012-11-01 12:15:12 +00:00
parent f3dc199c0b
commit dfef456f18

View File

@ -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;