NPE check

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1145405 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-07-12 00:37:45 +00:00
parent c8bb280df0
commit 169018be01

View File

@ -174,6 +174,8 @@ public final class TableRow extends Range
cells.add( tableCell );
}
if ( !cells.isEmpty() )
{
TableCell lastCell = cells.get( cells.size() - 1 );
if ( lastCell.numParagraphs() == 1
&& ( lastCell.getParagraph( 0 ).isTableRowEnd() ) )
@ -181,6 +183,7 @@ public final class TableRow extends Range
// remove "fake" cell
cells.remove( cells.size() - 1 );
}
}
if ( cells.size() != expectedCellsCount )
{