summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Rentz <dr@openoffice.org>2010-07-26 19:13:47 +0200
committerDaniel Rentz <dr@openoffice.org>2010-07-26 19:13:47 +0200
commitb33015e5107344b76c87985ba073989ef800efb5 (patch)
treee1eb2ce61c708cb14abddf349928a2a99bc31e70
parent570d392b903ed6e7eec5f02dcd9daf4791dd5f06 (diff)
mib17: prevent crash when VBAGlobals object is missing (this causes that document modules do not have an associated UNO object thus the DocObjectWrapper does not have a type provider)
-rw-r--r--basic/source/classes/sbxmod.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 1dbf8e4763..646d5e3ba7 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -121,16 +121,16 @@ class DocObjectWrapper : public DocObjectWrapper_BASE
public:
DocObjectWrapper( SbModule* pMod );
- ~DocObjectWrapper();
+ virtual ~DocObjectWrapper();
virtual void SAL_CALL acquire() throw();
virtual void SAL_CALL release() throw();
- virtual Sequence< sal_Int8 > SAL_CALL getImplementationId()
- throw ( com::sun::star::uno::RuntimeException )
+ virtual Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (RuntimeException)
{
+ if( !m_xAggregateTypeProv.is() )
+ throw RuntimeException();
return m_xAggregateTypeProv->getImplementationId();
-
}
virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (RuntimeException);
@@ -202,7 +202,7 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ), mName( pV
}
}
-void SAL_CALL
+void SAL_CALL
DocObjectWrapper::acquire() throw ()
{
osl_incrementInterlockedCount( &m_refCount );
@@ -220,8 +220,8 @@ DocObjectWrapper::release() throw ()
OSL_TRACE("DocObjectWrapper::release(%s) 0x%x refcount is now %d", rtl::OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount );
}
-DocObjectWrapper::~DocObjectWrapper()
-{
+DocObjectWrapper::~DocObjectWrapper()
+{
}
Sequence< Type > SAL_CALL DocObjectWrapper::getTypes()