clang: Returning null reference

Change-Id: I2cfc14e73696a027283dfa5eef98f784505dc5a3
This commit is contained in:
Caolán McNamara 2014-06-26 10:13:51 +01:00
parent 2daceb87b9
commit a7fcb3ed07
2 changed files with 7 additions and 8 deletions

View File

@ -2597,9 +2597,11 @@ SbxInfo* SbUnoMethod::GetInfo()
const Sequence<ParamInfo>& SbUnoMethod::getParamInfos( void )
{
if( !pParamInfoSeq && m_xUnoMethod.is() )
if (!pParamInfoSeq)
{
Sequence<ParamInfo> aTmp = m_xUnoMethod->getParameterInfos() ;
Sequence<ParamInfo> aTmp;
if (m_xUnoMethod.is())
aTmp = m_xUnoMethod->getParameterInfos();
pParamInfoSeq = new Sequence<ParamInfo>(aTmp);
}
return *pParamInfoSeq;

View File

@ -59,13 +59,10 @@ namespace svx
using namespace ::com::sun::star::datatransfer;
Reference<XTransferable> &transfer = const_cast<Reference<XTransferable> &>(_rData.GetTransferable());
XTransferable *pInterface = transfer.get();
OXFormsTransferable *pThis = dynamic_cast<OXFormsTransferable *>(pInterface);
DBG_ASSERT(pThis,"XTransferable is NOT an OXFormsTransferable???");
return pThis->m_aDescriptor;
OXFormsTransferable& rThis = dynamic_cast<OXFormsTransferable&>(*pInterface);
return rThis.m_aDescriptor;
}
} // namespace svx