summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_textlayout.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-10 19:43:56 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-10 19:43:56 +0000
commit948879d23226aea31aa9ae5f6eb1fb8572f0fc05 (patch)
treee40d527c3f8757d8038ef7f7cd26dca7a83e3574 /xfa/fxfa/cxfa_textlayout.cpp
parente844cccc8419dae40720aad57c3bcd7ced14a925 (diff)
downloadpdfium-948879d23226aea31aa9ae5f6eb1fb8572f0fc05.tar.xz
Rename GetFont to GetFontIfExists
This CL makes it explicit that GetFont may return nullptr. Change-Id: Icb7ec5ad4ed6c5f7a728230d1237898b8f2fd778 Reviewed-on: https://pdfium-review.googlesource.com/22673 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_textlayout.cpp')
-rw-r--r--xfa/fxfa/cxfa_textlayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/fxfa/cxfa_textlayout.cpp b/xfa/fxfa/cxfa_textlayout.cpp
index 3be45352f7..15ac909e2e 100644
--- a/xfa/fxfa/cxfa_textlayout.cpp
+++ b/xfa/fxfa/cxfa_textlayout.cpp
@@ -150,7 +150,7 @@ void CXFA_TextLayout::InitBreak(float fLineWidth) {
m_pBreak->SetLineBoundary(fStart, fLineWidth);
m_pBreak->SetLineStartPos(fStartPos);
- CXFA_Font* font = m_pTextProvider->GetFont();
+ CXFA_Font* font = m_pTextProvider->GetFontIfExists();
if (font) {
m_pBreak->SetHorizontalScale(
static_cast<int32_t>(font->GetHorizontalScale()));