Remove dead code in GetCharPosList().
The `current_font` pointer is never null.
Change-Id: I02a3be9fad1599020d539fde66efd1c86882c49c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/84851
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/render/charposlist.cpp b/core/fpdfapi/render/charposlist.cpp
index 5b09f29..26df52c 100644
--- a/core/fpdfapi/render/charposlist.cpp
+++ b/core/fpdfapi/render/charposlist.cpp
@@ -94,8 +94,7 @@
!current_font->GetSubstFont()->m_bFlagMM) {
int pdf_glyph_width = font->GetCharWidthF(char_code);
int font_glyph_width =
- current_font ? current_font->GetGlyphWidth(text_char_pos.m_GlyphIndex)
- : 0;
+ current_font->GetGlyphWidth(text_char_pos.m_GlyphIndex);
if (font_glyph_width && pdf_glyph_width > font_glyph_width + 1) {
// Move the initial x position by half of the excess (transformed to
// text space coordinates).