fonts: Fix nullptr de-reference during fallback path search.
R=herb@google.com Bug: 892643 Change-Id: Ia059e784794ff07f654a538186e619fb4f303ec9 Reviewed-on: https://skia-review.googlesource.com/c/160834 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Commit-Queue: Herb Derby <herb@google.com> Auto-Submit: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
This commit is contained in:
parent
d9c56b41d4
commit
9dd1e8236a
@ -93,7 +93,7 @@ bool SkScalerContextProxy::generatePath(SkGlyphID glyphID, SkPath* path) {
|
||||
// Since the scaler context is being called, we don't have the needed data. Try to find a
|
||||
// fallback before failing.
|
||||
auto desc = SkScalerContext::DescriptorGivenRecAndEffects(this->getRec(), this->getEffects());
|
||||
bool foundPath = fStrikeCache->desperationSearchForPath(*desc, glyphID, path);
|
||||
bool foundPath = fStrikeCache && fStrikeCache->desperationSearchForPath(*desc, glyphID, path);
|
||||
fDiscardableManager->notifyCacheMiss(foundPath
|
||||
? SkStrikeClient::CacheMissType::kGlyphPathFallback
|
||||
: SkStrikeClient::CacheMissType::kGlyphPath);
|
||||
|
Loading…
Reference in New Issue
Block a user