summaryrefslogtreecommitdiff
path: root/bean/com/sun/star/comp/beans/OOoBean.java
diff options
context:
space:
mode:
Diffstat (limited to 'bean/com/sun/star/comp/beans/OOoBean.java')
-rw-r--r--bean/com/sun/star/comp/beans/OOoBean.java6
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 );
}