From f14628438d70f621a48e5ab00a4fa76e8229d831 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 20 Feb 2016 20:42:45 +0000 Subject: coverity#1326436 Dereference null return value Change-Id: I40f73b48757e81ac4e1b5374bef4fea334ca8d0a --- qadevOOo/runner/base/java_fat.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'qadevOOo') diff --git a/qadevOOo/runner/base/java_fat.java b/qadevOOo/runner/base/java_fat.java index a0426fdb77ae..2fa1d05c9722 100644 --- a/qadevOOo/runner/base/java_fat.java +++ b/qadevOOo/runner/base/java_fat.java @@ -360,7 +360,11 @@ public class java_fat implements TestBase { try { tCase.initializeTestCase(param); - return tCase.getTestEnvironment(param); + TestEnvironment tEnv = tCase.getTestEnvironment(param); + if (tEnv == null) { + throw new Exception("Could not get env for '" + entry.entryName + "'"); + } + return tEnv; } catch (com.sun.star.lang.DisposedException de) { System.out.println("Office disposed"); closeExistingOffice(); -- cgit