poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1142762 - /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java
Date Mon, 04 Jul 2011 19:04:26 GMT
Author: sergey
Date: Mon Jul  4 19:04:26 2011
New Revision: 1142762

URL: http://svn.apache.org/viewvc?rev=1142762&view=rev
Log:
workaround for NPE caused by old Word format

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java?rev=1142762&r1=1142761&r2=1142762&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java Mon Jul 
4 19:04:26 2011
@@ -426,6 +426,10 @@ public final class CharacterRun
 
   public String getFontName()
   {
+    if (_doc.getFontTable() == null)
+      // old word format
+      return null;
+
     return _doc.getFontTable().getMainFont(_props.getFtcAscii());
   }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message