diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-16 17:22:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-16 20:25:07 +0100 |
commit | 46920005f74edcb70acfb8dd1a0ffb9553e5c2b2 (patch) | |
tree | 4fce3c4eed70d00ddeed9679a7436bc6cb9d43c9 /bean/com/sun | |
parent | 9aab980711f82471b012b1691699d9a28ef836f5 (diff) |
cid#1448516 silence Dereference null return value
Change-Id: Ifb7e14183e97c225ed7e68f93e6142d10c4a87b0
Reviewed-on: https://gerrit.libreoffice.org/82991
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'bean/com/sun')
-rw-r--r-- | bean/com/sun/star/comp/beans/OOoBean.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bean/com/sun/star/comp/beans/OOoBean.java b/bean/com/sun/star/comp/beans/OOoBean.java index 0345d48ca45e..3475447368e4 100644 --- a/bean/com/sun/star/comp/beans/OOoBean.java +++ b/bean/com/sun/star/comp/beans/OOoBean.java @@ -291,12 +291,16 @@ public class OOoBean // avoid concurrent access from multiple threads final OfficeConnection iConn = getOOoConnection(); + com.sun.star.uno.XComponentContext xComponentContext = iConn.getComponentContext(); + if (xComponentContext == null) + throw new NoConnectionException(); + Thread aConnectorThread = new Thread("getServiceManager") { @Override public void run() { com.sun.star.lang.XMultiComponentFactory aFactory = - iConn.getComponentContext().getServiceManager(); + xComponentContext.getServiceManager(); xServiceFactory = UnoRuntime.queryInterface( com.sun.star.lang.XMultiServiceFactory.class, aFactory ); } |