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