diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index e4022e7a6..a0816adfc 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + 52662 - CharacterRun NPE fix when fetching symbol fonts, where no fonts are defined 52658 - support mergin table cells in XSLF validate row number and column index in SXSSF when creating new rows / cells 51498 - fixed evaluation of blank cells in COUNTIF diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java index 61be15b66..d049969f7 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java @@ -606,8 +606,13 @@ public final class CharacterRun public Ffn getSymbolFont() { if (isSymbol()) { + if (_doc.getFontTable() == null) + return null; + + // Fetch all font names Ffn[] fontNames = _doc.getFontTable().getFontNames(); + // Try to find the name of the font for our symbol if (fontNames.length <= _props.getFtcSym()) return null;