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

coverity#735924 Explicit null dereferenced

Change-Id: I77044f6f9e99ddaa64cf69ba22205d6536a90b1b
üst f36614bb
...@@ -1115,11 +1115,11 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, ...@@ -1115,11 +1115,11 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{ {
pEnclosingSection = pEnclosingSection->GetParent(); pEnclosingSection = pEnclosingSection->GetParent();
} }
if (pEnclosingSection) SwTOXBaseSection* const pTOXBaseSect = pEnclosingSection ?
PTR_CAST(SwTOXBaseSection, pEnclosingSection) : NULL;
if (pTOXBaseSect)
{ {
// convert section to TOXBase and get SwXDocumentIndex // convert section to TOXBase and get SwXDocumentIndex
SwTOXBaseSection *const pTOXBaseSect =
PTR_CAST(SwTOXBaseSection, pEnclosingSection);
const uno::Reference<text::XDocumentIndex> xIndex = const uno::Reference<text::XDocumentIndex> xIndex =
SwXDocumentIndex::CreateXDocumentIndex( SwXDocumentIndex::CreateXDocumentIndex(
*pTOXBaseSect->GetFmt()->GetDoc(), *pTOXBaseSect); *pTOXBaseSect->GetFmt()->GetDoc(), *pTOXBaseSect);
......
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