diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-01-20 11:07:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-01-20 11:08:43 +0000 |
commit | e46baa9e04a7715f35b7a068dde6cbabc6dd4775 (patch) | |
tree | 523c241c36b6c9eee556577cc43b00c017bb08e7 /qadevOOo | |
parent | b45de8782ce6be2250f82bc19c4f298ede8a2f43 (diff) |
coverity#1326457 Dereference null return value
Change-Id: I8bb949a364b3ccd9ccbec9a8275b505518e8f092
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/tests/java/ifc/io/_XOutputStream.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/qadevOOo/tests/java/ifc/io/_XOutputStream.java b/qadevOOo/tests/java/ifc/io/_XOutputStream.java index 01caa6f48d20..c183002128c5 100644 --- a/qadevOOo/tests/java/ifc/io/_XOutputStream.java +++ b/qadevOOo/tests/java/ifc/io/_XOutputStream.java @@ -83,12 +83,16 @@ public class _XOutputStream extends MultiMethodTest { res = false; } - XInputStream xInStream = checker.getInStream(); byte[][] readData = new byte[1][data.length]; - try { - xInStream.readBytes(readData, data.length); - } catch(com.sun.star.io.IOException e) { - log.println("Couldn't read data:" + e); + XInputStream xInStream = checker.getInStream(); + if (xInStream == null) { + try { + xInStream.readBytes(readData, data.length); + } catch(com.sun.star.io.IOException e) { + log.println("Couldn't read data:" + e); + res = false; + } + } else { res = false; } |