summaryrefslogtreecommitdiff
path: root/bean
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-20 15:36:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-20 21:18:36 +0100
commit8536c279602a554ae2fb803ce4ce384102dbbd76 (patch)
tree8c0fd708c4409bc8c068048259c7cd8129e6e9f8 /bean
parent86d275366a1d8c32273d7cf347623062935ec576 (diff)
coverity#1326431 Dereference null return value
Change-Id: Ib85b3e03d2a9ce6339cd2496e33cc09cff2b9952
Diffstat (limited to 'bean')
-rw-r--r--bean/com/sun/star/comp/beans/LocalOfficeWindow.java34
1 files changed, 13 insertions, 21 deletions
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
index a968de811ae8..7444e1e880fb 100644
--- a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
+++ b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
@@ -89,28 +89,20 @@ public class LocalOfficeWindow
}
/**
- * Returns an AWT toolkit.
- */
- private XToolkit queryAWTToolkit()
- throws com.sun.star.uno.Exception
- {
- // Create a UNO toolkit.
- XMultiComponentFactory compfactory;
- XComponentContext xContext = mConnection.getComponentContext();
- if ( xContext != null )
- {
- compfactory = mConnection.getComponentContext().getServiceManager();
- XMultiServiceFactory factory;
- factory = UnoRuntime.queryInterface(
- XMultiServiceFactory.class, compfactory);
- Object object = factory.createInstance( "com.sun.star.awt.Toolkit");
- return UnoRuntime.queryInterface(XToolkit.class, object);
- }
- else
- return null;
- }
+ * Returns an AWT toolkit.
+ */
+ private XToolkit queryAWTToolkit() throws com.sun.star.uno.Exception
+ {
+ // Create a UNO toolkit.
+ XComponentContext xContext = mConnection.getComponentContext();
+ XMultiComponentFactory compfactory = mConnection.getComponentContext().getServiceManager();
+ XMultiServiceFactory factory = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class, compfactory);
+ Object object = factory.createInstance( "com.sun.star.awt.Toolkit");
+ return UnoRuntime.queryInterface(XToolkit.class, object);
+ }
- /// called when system parent is available, reparents the bean window
+ /// called when system parent is available, reparents the bean window
private synchronized void aquireSystemWindow()
{
if ( !bPeer )