diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-19 12:35:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-19 12:54:24 +0000 |
commit | 26fddc3196c7ab932ada544b84b74da06fa2596d (patch) | |
tree | 4f7d215321f841b55ad72a275cce99423e23f9bd /lotuswordpro | |
parent | 8f3c796ecf926f81f6229fbb040095286c8adbfe (diff) |
coverity#1343624 Unchecked dynamic_cast
Change-Id: Ia303a5dc97fb5e491e86a3484040e657f1b480d4
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpfribsection.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwpfribsection.cxx b/lotuswordpro/source/filter/lwpfribsection.cxx index d6ee8a5ccc62..591ed4a12a8b 100644 --- a/lotuswordpro/source/filter/lwpfribsection.cxx +++ b/lotuswordpro/source/filter/lwpfribsection.cxx @@ -395,12 +395,13 @@ void LwpMasterPage::ParseSection(LwpFrib* pFrib) pCurrContainer->RemoveLastContent(); } } - pStory->AddXFContent( pContent ); + if (pStory) + pStory->AddXFContent( pContent ); } else { LwpStory* pStory = dynamic_cast<LwpStory*> ( m_pPara->GetStoryID().obj().get() ); - pContent = pStory->GetXFContent(); + pContent = pStory ? pStory->GetXFContent() : nullptr; } if(pContent) { |