diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java index dbb337a8f..fc9ece7a5 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java @@ -132,7 +132,11 @@ public abstract class AbstractWordConverter TableCell upperCell = null; for ( int r1 = r - 1; r1 >= 0; r1-- ) { - final TableCell prevCell = table.getRow( r1 ).getCell( c ); + final TableRow row = table.getRow( r1 ); + if ( row == null || c >= row.numCells() ) + continue; + + final TableCell prevCell = row.getCell( c ); if ( prevCell != null && prevCell.isFirstVerticallyMerged() ) { upperCell = prevCell;