Kaydet (Commit) 8536c279 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1326431 Dereference null return value

Change-Id: Ib85b3e03d2a9ce6339cd2496e33cc09cff2b9952
üst 86d27536
...@@ -89,28 +89,20 @@ public class LocalOfficeWindow ...@@ -89,28 +89,20 @@ public class LocalOfficeWindow
} }
/** /**
* Returns an AWT toolkit. * Returns an AWT toolkit.
*/ */
private XToolkit queryAWTToolkit() private XToolkit queryAWTToolkit() throws com.sun.star.uno.Exception
throws com.sun.star.uno.Exception {
{ // Create a UNO toolkit.
// Create a UNO toolkit. XComponentContext xContext = mConnection.getComponentContext();
XMultiComponentFactory compfactory; XMultiComponentFactory compfactory = mConnection.getComponentContext().getServiceManager();
XComponentContext xContext = mConnection.getComponentContext(); XMultiServiceFactory factory = UnoRuntime.queryInterface(
if ( xContext != null ) XMultiServiceFactory.class, compfactory);
{ Object object = factory.createInstance( "com.sun.star.awt.Toolkit");
compfactory = mConnection.getComponentContext().getServiceManager(); return UnoRuntime.queryInterface(XToolkit.class, object);
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;
}
/// called when system parent is available, reparents the bean window /// called when system parent is available, reparents the bean window
private synchronized void aquireSystemWindow() private synchronized void aquireSystemWindow()
{ {
if ( !bPeer ) if ( !bPeer )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment