[Libreoffice-commits] core.git: bean/com

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Nov 17 19:09:19 UTC 2019


 bean/com/sun/star/comp/beans/LocalOfficeWindow.java |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 26960bad06fe26f5652faf42e20073bf7d201eeb
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Nov 17 17:27:08 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Nov 17 20:08:23 2019 +0100

    cid#1448230 Dereference null return value
    
    Change-Id: I846959c2f92dc8078ad2ed8accb8f7be0f2833ce
    Reviewed-on: https://gerrit.libreoffice.org/83023
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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);


More information about the Libreoffice-commits mailing list