Kaydet (Commit) a91d7e2d authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#704766 Dereference after null check

Change-Id: I8491260f198e80138241de891ef29cc8ab21a008
üst d37f5fdd
......@@ -38,24 +38,21 @@ SdTransferable* TransferableData::CreateTransferable (
return pTransferable;
}
::boost::shared_ptr<TransferableData> TransferableData::GetFromTransferable (const SdTransferable* pTransferable)
{
::boost::shared_ptr<TransferableData> pData;
for (sal_Int32 nIndex=0,nCount=pTransferable->GetUserDataCount(); nIndex<nCount; ++nIndex)
if (pTransferable)
{
pData = ::boost::dynamic_pointer_cast<TransferableData>(pTransferable->GetUserData(nIndex));
if (pData)
return pData;
for (sal_Int32 nIndex=0,nCount=pTransferable->GetUserDataCount(); nIndex<nCount; ++nIndex)
{
::boost::shared_ptr<TransferableData> xData =
::boost::dynamic_pointer_cast<TransferableData>(pTransferable->GetUserData(nIndex));
if (xData)
return xData;
}
}
return ::boost::shared_ptr<TransferableData>();
}
TransferableData::TransferableData (
SlideSorterViewShell* pViewShell,
const ::std::vector<Representative>& rRepresentatives)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment