diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkPathMeasure.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp index 626deebd72..34b164827c 100644 --- a/src/core/SkPathMeasure.cpp +++ b/src/core/SkPathMeasure.cpp @@ -513,6 +513,9 @@ SkScalar SkPathMeasure::getLength() { if (fLength < 0) { this->buildSegments(); } + if (SkScalarIsNaN(fLength)) { + fLength = 0; + } SkASSERT(fLength >= 0); return fLength; } |