Avoid NullPointerException
...when dispose is called without a preceding call to initialize (as would happen with an improved CppunitTest_services) Change-Id: Ic632d736ecb27509b092ef526cf0dfc964023663 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150576 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -515,10 +515,12 @@ public class SecurityDialog extends WeakBase implements
|
||||
|
||||
public void dispose() {
|
||||
|
||||
XComponent xComponent =
|
||||
UnoRuntime.queryInterface(XComponent.class, _xDialog);
|
||||
if (_xDialog != null) {
|
||||
XComponent xComponent =
|
||||
UnoRuntime.queryInterface(XComponent.class, _xDialog);
|
||||
|
||||
xComponent.dispose();
|
||||
xComponent.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public void addEventListener(com.sun.star.lang.XEventListener xListener) {
|
||||
|
||||
Reference in New Issue
Block a user