diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-13 11:17:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-13 14:03:27 +0000 |
commit | 0c4bda19f07b5b14980e320b7d243e989d432349 (patch) | |
tree | ee180fc5051cf8ebbd2c93af63ac4b8338819bab /sw | |
parent | debe27d27a0c0ba058f8d0f978ddbcb528c4ebf4 (diff) |
coverity#705519 Dereference null return value
Change-Id: Ifdbb4fe65e5c2a0c9e037ec9990697550d44af3f
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/chrdlg/numpara.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index b1febbde90c3..b6c2b8c0ff51 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -123,10 +123,13 @@ sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) aStyle = m_pNumberStyleLB->GetSelectEntry(); const SfxStringItem* pOldRule = (const SfxStringItem*)GetOldItem( rSet, SID_ATTR_PARA_NUMRULE); SfxStringItem* pRule = (SfxStringItem*)pOldRule->Clone(); - pRule->SetValue(aStyle); - rSet.Put(*pRule); - delete pRule; - bModified = sal_True; + if (pRule) + { + pRule->SetValue(aStyle); + rSet.Put(*pRule); + delete pRule; + bModified = sal_True; + } } if(m_pNewStartCB->GetState() != m_pNewStartCB->GetSavedValue() || m_pNewStartNumberCB->GetState() != m_pNewStartNumberCB->GetSavedValue()|| |