cid#1473991 Dereference null return value
Change-Id: I11d9d685a278d31f591927b67637e9224a99fb27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113096 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
parent
1bad470976
commit
b4a741291d
1 changed files with 6 additions and 5 deletions
|
@ -1405,10 +1405,9 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
|
|||
iConnection.addEventListener( this );
|
||||
|
||||
// listen on a terminating OOo
|
||||
try {
|
||||
getOOoDesktop().addTerminateListener( this );
|
||||
}
|
||||
catch ( Throwable aExc ) {}
|
||||
com.sun.star.frame.XDesktop xDesktop = getOOoDesktop();
|
||||
if (xDesktop != null)
|
||||
xDesktop.addTerminateListener( this );
|
||||
|
||||
// start this thread as a daemon
|
||||
setDaemon( true );
|
||||
|
@ -1425,7 +1424,9 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
|
|||
|
||||
// do not listen on a terminating OOo anymore
|
||||
try {
|
||||
getOOoDesktop().removeTerminateListener( this );
|
||||
com.sun.star.frame.XDesktop xDesktop = getOOoDesktop();
|
||||
if (xDesktop != null)
|
||||
xDesktop.removeTerminateListener( this );
|
||||
}
|
||||
catch ( Throwable aExc ) {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue