SkAdvancedTypefaceMetrics: fail cleanly.
BUG=567031 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1956753002 Review-Url: https://codereview.chromium.org/1956753002
This commit is contained in:
parent
3767cd6cff
commit
bad1abc748
@ -257,6 +257,9 @@ SkAdvancedTypefaceMetrics::AdvanceMetric<Data>* getAdvanceData(
|
|||||||
}
|
}
|
||||||
if (curRange->fStartId == lastIndex) {
|
if (curRange->fStartId == lastIndex) {
|
||||||
SkASSERT(prevRange);
|
SkASSERT(prevRange);
|
||||||
|
if (!prevRange) {
|
||||||
|
return nullptr; // https://crbug.com/567031
|
||||||
|
}
|
||||||
SkASSERT(prevRange->fNext->fStartId == lastIndex);
|
SkASSERT(prevRange->fNext->fStartId == lastIndex);
|
||||||
prevRange->fNext.reset();
|
prevRange->fNext.reset();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user