From 26960bad06fe26f5652faf42e20073bf7d201eeb Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 17 Nov 2019 17:27:08 +0000 Subject: cid#1448230 Dereference null return value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I846959c2f92dc8078ad2ed8accb8f7be0f2833ce Reviewed-on: https://gerrit.libreoffice.org/83023 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- bean/com/sun/star/comp/beans/LocalOfficeWindow.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bean') diff --git a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java index 1efc99032594..2e04a00c7b42 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java @@ -95,6 +95,8 @@ public class LocalOfficeWindow { // Create a UNO toolkit. XComponentContext xContext = mConnection.getComponentContext(); + if (xContext == null) + throw new RuntimeException("no context"); XMultiComponentFactory compfactory = xContext.getServiceManager(); XMultiServiceFactory factory = UnoRuntime.queryInterface( XMultiServiceFactory.class, compfactory); -- cgit v1.2.3