diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index a9949377f2d7..ec82700b5afa 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2597,10 +2597,12 @@ SbxInfo* SbUnoMethod::GetInfo() const Sequence& SbUnoMethod::getParamInfos( void ) { - if( !pParamInfoSeq && m_xUnoMethod.is() ) + if (!pParamInfoSeq) { - Sequence aTmp = m_xUnoMethod->getParameterInfos() ; - pParamInfoSeq = new Sequence( aTmp ); + Sequence aTmp; + if (m_xUnoMethod.is()) + aTmp = m_xUnoMethod->getParameterInfos(); + pParamInfoSeq = new Sequence(aTmp); } return *pParamInfoSeq; } diff --git a/svx/source/fmcomp/xmlexchg.cxx b/svx/source/fmcomp/xmlexchg.cxx index 058d36d85d81..0460e2596c92 100644 --- a/svx/source/fmcomp/xmlexchg.cxx +++ b/svx/source/fmcomp/xmlexchg.cxx @@ -59,13 +59,10 @@ namespace svx using namespace ::com::sun::star::datatransfer; Reference &transfer = const_cast &>(_rData.GetTransferable()); XTransferable *pInterface = transfer.get(); - OXFormsTransferable *pThis = dynamic_cast(pInterface); - DBG_ASSERT(pThis,"XTransferable is NOT an OXFormsTransferable???"); - return pThis->m_aDescriptor; + OXFormsTransferable& rThis = dynamic_cast(*pInterface); + return rThis.m_aDescriptor; } - - } // namespace svx