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

coverity#705519 Dereference null return value

Change-Id: Ieb164e6c7349120311ab8cb6f74cec7b6851132c
üst cb20d7c3
...@@ -109,11 +109,14 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) ...@@ -109,11 +109,14 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
{ {
const sal_uInt16 aOutlineLv = m_pOutlineLvLB->GetSelectEntryPos(); const sal_uInt16 aOutlineLv = m_pOutlineLvLB->GetSelectEntryPos();
const SfxUInt16Item* pOldOutlineLv = (const SfxUInt16Item*)GetOldItem( rSet, SID_ATTR_PARA_OUTLINE_LEVEL); const SfxUInt16Item* pOldOutlineLv = (const SfxUInt16Item*)GetOldItem( rSet, SID_ATTR_PARA_OUTLINE_LEVEL);
SfxUInt16Item* pOutlineLv = (SfxUInt16Item*)pOldOutlineLv->Clone(); if (pOldOutlineLv)
pOutlineLv->SetValue( aOutlineLv ); {
rSet.Put(*pOutlineLv); SfxUInt16Item* pOutlineLv = (SfxUInt16Item*)pOldOutlineLv->Clone();
delete pOutlineLv; pOutlineLv->SetValue( aOutlineLv );
bModified = true; rSet.Put(*pOutlineLv);
delete pOutlineLv;
bModified = true;
}
} }
if( m_pNumberStyleLB->IsValueChangedFromSaved()) if( m_pNumberStyleLB->IsValueChangedFromSaved())
...@@ -122,7 +125,7 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) ...@@ -122,7 +125,7 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
if(m_pNumberStyleLB->GetSelectEntryPos()) if(m_pNumberStyleLB->GetSelectEntryPos())
aStyle = m_pNumberStyleLB->GetSelectEntry(); aStyle = m_pNumberStyleLB->GetSelectEntry();
const SfxStringItem* pOldRule = (const SfxStringItem*)GetOldItem( rSet, SID_ATTR_PARA_NUMRULE); const SfxStringItem* pOldRule = (const SfxStringItem*)GetOldItem( rSet, SID_ATTR_PARA_NUMRULE);
SfxStringItem* pRule = (SfxStringItem*)pOldRule->Clone(); SfxStringItem* pRule = pOldRule ? (SfxStringItem*)pOldRule->Clone() : NULL;
if (pRule) if (pRule)
{ {
pRule->SetValue(aStyle); pRule->SetValue(aStyle);
......
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