Commit fa22ba9c authored by Emil A Eklund's avatar Emil A Eklund Committed by Commit Bot

Add check for SimpleFontData in ShapeResult

Tbr: drott@chromium.org
Bug: 982221
Change-Id: Ifbe5ab69899ea8a165813efab652caabe2e35d14
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1692034Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675776}
parent 639ffed2
...@@ -1386,6 +1386,7 @@ scoped_refptr<ShapeResult> ShapeResult::CreateForTabulationCharacters( ...@@ -1386,6 +1386,7 @@ scoped_refptr<ShapeResult> ShapeResult::CreateForTabulationCharacters(
unsigned length) { unsigned length) {
DCHECK_GT(length, 0u); DCHECK_GT(length, 0u);
const SimpleFontData* font_data = font->PrimaryFont(); const SimpleFontData* font_data = font->PrimaryFont();
DCHECK(font_data);
scoped_refptr<ShapeResult> result = scoped_refptr<ShapeResult> result =
ShapeResult::Create(font, start_index, length, direction); ShapeResult::Create(font, start_index, length, direction);
result->num_glyphs_ = length; result->num_glyphs_ = length;
...@@ -1428,6 +1429,7 @@ scoped_refptr<ShapeResult> ShapeResult::CreateForSpaces(const Font* font, ...@@ -1428,6 +1429,7 @@ scoped_refptr<ShapeResult> ShapeResult::CreateForSpaces(const Font* font,
float width) { float width) {
DCHECK_GT(length, 0u); DCHECK_GT(length, 0u);
const SimpleFontData* font_data = font->PrimaryFont(); const SimpleFontData* font_data = font->PrimaryFont();
DCHECK(font_data);
scoped_refptr<ShapeResult> result = scoped_refptr<ShapeResult> result =
ShapeResult::Create(font, start_index, length, direction); ShapeResult::Create(font, start_index, length, direction);
result->num_glyphs_ = length; result->num_glyphs_ = length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment