[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - cui/source

Herbert Dürr hdu at apache.org
Mon Aug 12 12:11:55 PDT 2013


 cui/source/options/optupdt.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 4e174d1607f99f3d23c514e1847d49f631cef877
Author: Herbert Dürr <hdu at apache.org>
Date:   Fri Aug 9 15:03:18 2013 +0000

    Resolves: #i122818# fix crash in online-update-check when no app is active
    
    Closing all application windows and retaining access to the application menu
    is only possible on MacOSX. The DispatchProvider used for the update check
    seems to depend on having an active application window. Maybe it is possible
    to get the update check working without it but this patch doesn't attempt
    that, it prevent further escalation such as crashes.
    
    Fixed by: Herbert Duerr
    Debugged by: Oliver-Rainer Wittmann, Herbert Duerr
    Found by: Frantisek Erben
    
    (cherry picked from commit bd363910bb80e61805672430de7870e1583b0052)
    
    Signed-off-by: Tor Lillqvist <tml at iki.fi>
    
    Conflicts:
    	cui/source/options/optupdt.cxx
    
    Change-Id: I0a00b8a3af8e37997e82ffd325c8239142acbf4a
    (cherry picked from commit 8354ea874e2dea4740e31c00d6bea314b8c5a8e8)
    
    Signed-off-by: Tor Lillqvist <tml at iki.fi>

diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 7cae029..f08fb83 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -341,13 +341,14 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, CheckNowHdl_Impl)
         uno::Reference< frame::XDispatchProvider > xDispatchProvider(
             xDesktop->getCurrentFrame(), uno::UNO_QUERY );
 
-        uno::Reference< frame::XDispatch > xDispatch = xDispatchProvider->queryDispatch(aURL, OUString(), 0);
+        uno::Reference< frame::XDispatch > xDispatch;
+        if( xDispatchProvider.is() )
+            xDispatch = xDispatchProvider->queryDispatch(aURL, OUString(), 0);
 
         if( xDispatch.is() )
-        {
             xDispatch->dispatch(aURL, uno::Sequence< beans::PropertyValue > ());
-            UpdateLastCheckedText();
-        }
+
+        UpdateLastCheckedText();
     }
     catch( const uno::Exception& e )
     {


More information about the Libreoffice-commits mailing list