summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-28 14:14:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-28 14:30:43 +0000
commit1b8179c5f4f2e6470c8a572443342eea666edc3e (patch)
treef319625ca9974bbaaa29e2c5acce45c641c12570 /sw
parent22c0cdc0146598cad53180be9b5f9378d2bc1d0c (diff)
coverity#705513 Dereference null return value
Change-Id: I7fd1569fe5d5c4383f028915af95fec55b8f8121
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8par.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 84965e88b6f5..e56207f52789 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1308,12 +1308,12 @@ const SwNumFmt* SwWW8FltControlStack::GetNumFmtFromStack(const SwPosition &rPos,
const SfxPoolItem *pItem = GetStackAttr(rPos, RES_FLTR_NUMRULE);
if (pItem && rTxtNode.GetNumRule())
{
- OUString sName(((SfxStringItem*)pItem)->GetValue());
if (rTxtNode.IsCountedInList())
{
+ OUString sName(((SfxStringItem*)pItem)->GetValue());
const SwNumRule *pRule = pDoc->FindNumRulePtr(sName);
-
- pRet = GetNumFmtFromSwNumRuleLevel(*pRule, rTxtNode.GetActualListLevel());
+ if (pRule)
+ pRet = GetNumFmtFromSwNumRuleLevel(*pRule, rTxtNode.GetActualListLevel());
}
}
return pRet;