diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-07 16:15:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-08 09:56:20 +0100 |
commit | e3ae233c62adf8b1719421bee37d737caad7472a (patch) | |
tree | 94f622f64ca1afeadf70da11b720d7f25fced831 /sw | |
parent | ef4f94028d4eb6b8bb75291b185ae9101bcd2056 (diff) |
coverity#735957 Explicit null dereferenced
Change-Id: I70a46f251faa6a1d6e52bc816473a29416953ded
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/xml/xmlexpit.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index d1d783723490..05302f22f37a 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -870,12 +870,14 @@ bool SvXMLExportItemMapper::QueryXMLValue( case RES_KEEP: { SvxFmtKeepItem* pFmtKeep = PTR_CAST(SvxFmtKeepItem, &rItem); - OSL_ENSURE( pFmtKeep != NULL, "Wrong Which-ID" ); - - aOut.append( pFmtKeep->GetValue() - ? GetXMLToken( XML_ALWAYS ) - : GetXMLToken( XML_AUTO ) ); - bOk = true; + assert(pFmtKeep); //Wrong Which-ID + if (pFmtKeep) + { + aOut.append( pFmtKeep->GetValue() + ? GetXMLToken( XML_ALWAYS ) + : GetXMLToken( XML_AUTO ) ); + bOk = true; + } } break; |