diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-03-04 10:08:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-03-04 11:24:27 +0000 |
commit | b08e200c3dfa964f257c8b7719ef9c801fb107d7 (patch) | |
tree | f534c0633d8d09fae511b0df5323b8814ababc43 /xmerge | |
parent | 5adfcaaadc45b38ed0358a3dde4c39d79b6ceedc (diff) |
coverity#1326237 Dereference after null check
Change-Id: Iac84adff096c5b847b2a63ac57ddf5b2f5e34e11
Diffstat (limited to 'xmerge')
-rw-r--r-- | xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java index bfd7fb3e8476..1523b9089585 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java @@ -490,11 +490,16 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, Debug.log(Debug.TRACE, "<tr>"); } + if (rowElement == null) { + //utterly busted + break; + } + // Get the column number of the current cell int newCol = decoder.getColNumber(); // Check to see if some columns were skipped - if (newCol != col && rowElement != null) { + if (newCol != col) { // How many columns have we skipped? int numColsSkipped = newCol - col; |