]> source.dussan.org Git - poi.git/commitdiff
Apply patch from bug #52662 - CharacterRun NPE fix when fetching symbol fonts, where...
authorNick Burch <nick@apache.org>
Tue, 14 Feb 2012 12:56:30 +0000 (12:56 +0000)
committerNick Burch <nick@apache.org>
Tue, 14 Feb 2012 12:56:30 +0000 (12:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1243907 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/status.xml
src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java

index e4022e7a643f0d28216c1791129b29521a94efc4..a0816adfcfaf1b97d1ed80d5bb4bdab7af8caac4 100644 (file)
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.8-beta6" date="2012-??-??">
+           <action dev="poi-developers" type="fix">52662 - CharacterRun NPE fix when fetching symbol fonts, where no fonts are defined</action>
            <action dev="poi-developers" type="add">52658 - support mergin table cells in XSLF</action>
            <action dev="poi-developers" type="add">validate row number and column index in SXSSF when creating new rows / cells</action>
            <action dev="poi-developers" type="fix">51498 - fixed evaluation of blank cells in COUNTIF</action>
index 61be15b668ffda60a3623f78345d4429889bc86e..d049969f755fe8b714e718a54b38c5646776f311 100644 (file)
@@ -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;