HWPF: fix NPE when reading paragraph properties

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1305810 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maxim Valyanskiy 2012-03-27 11:14:47 +00:00
parent e33be7fdd6
commit 95b5c80bf0
2 changed files with 2 additions and 2 deletions

View File

@ -232,7 +232,7 @@ public class AbstractWordUtils
final ListLevel listLevel = listTables.getLevel( listId,
paragraph.getIlvl() );
if ( listLevel.getNumberText() == null )
if ( listLevel==null || listLevel.getNumberText() == null )
return EMPTY;
StringBuffer bulletBuffer = new StringBuffer();

View File

@ -110,7 +110,7 @@ public class Paragraph extends Range implements Cloneable {
final ListLevel listLevel = listTables.getLevel(
listFormatOverride.getLsid(), properties.getIlvl() );
if ( listLevel.getGrpprlPapx() != null )
if ( listLevel!=null && listLevel.getGrpprlPapx() != null )
{
properties = ParagraphSprmUncompressor.uncompressPAP(
properties, listLevel.getGrpprlPapx(), 0 );