summaryrefslogtreecommitdiff
path: root/extensions/source
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-12-04 16:09:03 +0100
committerKurt Zenker <kz@openoffice.org>2009-12-04 16:09:03 +0100
commitc32e21562f65b81d833c0f73894c4063cd056503 (patch)
tree1a9a9aa8472d72f7678508b3cc65c3b50febb3ce /extensions/source
parentaecb484c17d58280a338d0edd4931166cf74926c (diff)
parentcdbdf9834f36dcaec5fca09db5f8326ccf9159c5 (diff)
CWS-TOOLING: integrate CWS dv16_DEV300
Diffstat (limited to 'extensions/source')
-rw-r--r--extensions/source/update/check/updatecheck.cxx2
-rw-r--r--extensions/source/update/check/updatehdl.cxx10
-rw-r--r--extensions/source/update/feed/updatefeed.cxx6
3 files changed, 16 insertions, 2 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 95af9cf8e666..ad1debd91beb 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() )
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index e7ca93eacc18..bed6bed85bc3 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -114,14 +114,16 @@ public:
throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException)
{
sal_Int32 n = m_xStream->readBytes(aData, nBytesToRead);
- OSL_TRACE( aData.get()->elements );
+ if ( n )
+ OSL_TRACE( "Read [%d] bytes: %s\n", n, aData.get()->elements );
return n;
};
virtual sal_Int32 SAL_CALL readSomeBytes(uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead)
throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException)
{
sal_Int32 n = m_xStream->readSomeBytes(aData, nMaxBytesToRead);
- OSL_TRACE( aData.get()->elements );
+ if ( n )
+ OSL_TRACE( "Read [%d] bytes: %s\n", n, aData.get()->elements );
return n;
};
virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip )