workaround for NPE caused by old Word format

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1142762 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-07-04 19:04:26 +00:00
parent 89494004ed
commit 73fe53c0be
1 changed files with 4 additions and 0 deletions

View File

@ -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());
}