diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-19 12:27:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-19 15:37:56 +0000 |
commit | 3d1b1eea83703919c43620f9adef05e5b24c4bed (patch) | |
tree | 29736d072e571036e70afaccc4ca7d98740ccba1 /lotuswordpro | |
parent | b9b8ddb60ec57df04828e9386c97d8bc6d12d34c (diff) |
coverity#735757 Unchecked dynamic_cast
Change-Id: I268b9c4df81598f68b8da2c258d70c2118b69d82
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwplayout.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx index 5dbf65ffb023..c0fd96d119b0 100644 --- a/lotuswordpro/source/filter/lwplayout.cxx +++ b/lotuswordpro/source/filter/lwplayout.cxx @@ -921,7 +921,10 @@ LwpTabOverride* LwpMiddleLayout::GetTabOverride() if(m_nAttributes & OVER_TABS) { if(!m_TabPiece.IsNull()) - return (LwpTabOverride*) dynamic_cast<LwpTabPiece*>(m_TabPiece.obj())->GetOverride(); + { + LwpTabPiece *pPiece = dynamic_cast<LwpTabPiece*>(m_TabPiece.obj()); + return (LwpTabOverride*)(pPiece ? pPiece->GetOverride() : NULL); + } return NULL; } else if( !m_BasedOnStyle.IsNull() ) |