diff options
author | Dirk Völzke <dv@openoffice.org> | 2009-11-19 11:54:29 +0000 |
---|---|---|
committer | Dirk Völzke <dv@openoffice.org> | 2009-11-19 11:54:29 +0000 |
commit | 85091386c5e5025e3db3f7ec8903c71856c05da7 (patch) | |
tree | cf25262bd70900b457b1807b6dfb283b9008cdfa | |
parent | d3af929cd34466863ef2699e3398b1fd0ffae337 (diff) |
#i106978# the extension manager should set an interaction handler when looking for updates
-rw-r--r-- | extensions/source/update/check/updatecheck.cxx | 2 | ||||
-rw-r--r-- | extensions/source/update/check/updatehdl.cxx | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 23d4da29a41f..9782d7c89226 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -1528,6 +1528,8 @@ void UpdateCheck::showExtensionDialog() rtl::Reference<UpdateHandler> UpdateCheck::getUpdateHandler() { + osl::MutexGuard aGuard(m_aMutex); + if( ! m_aUpdateHandler.is() ) m_aUpdateHandler = new UpdateHandler(m_xContext, this); diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 19ca5588c09c..9d746d50373f 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -200,6 +200,10 @@ void UpdateHandler::setVisible( bool bVisible ) if ( !mxUpdDlg.is() ) createDialog(); + // this should never happen, but if it happens we better return here + if ( !mxUpdDlg.is() ) + return; + updateState( meCurState ); uno::Reference< awt::XWindow > xWindow( mxUpdDlg, uno::UNO_QUERY ); @@ -1032,6 +1036,12 @@ void UpdateHandler::showControls( short nControls ) //-------------------------------------------------------------------- void UpdateHandler::createDialog() { + if ( !mxContext.is() ) + { + OSL_ASSERT( false ); + return; + } + uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager() ); if( xServiceManager.is() ) |