diff --git a/src/core/SkAdvancedTypefaceMetrics.cpp b/src/core/SkAdvancedTypefaceMetrics.cpp index 318f4a06bc..0e9ba95bf4 100644 --- a/src/core/SkAdvancedTypefaceMetrics.cpp +++ b/src/core/SkAdvancedTypefaceMetrics.cpp @@ -257,6 +257,9 @@ SkAdvancedTypefaceMetrics::AdvanceMetric* getAdvanceData( } if (curRange->fStartId == lastIndex) { SkASSERT(prevRange); + if (!prevRange) { + return nullptr; // https://crbug.com/567031 + } SkASSERT(prevRange->fNext->fStartId == lastIndex); prevRange->fNext.reset(); } else {