From 3d1b1eea83703919c43620f9adef05e5b24c4bed Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 19 Mar 2014 12:27:07 +0000 Subject: coverity#735757 Unchecked dynamic_cast Change-Id: I268b9c4df81598f68b8da2c258d70c2118b69d82 --- lotuswordpro/source/filter/lwplayout.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lotuswordpro') 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(m_TabPiece.obj())->GetOverride(); + { + LwpTabPiece *pPiece = dynamic_cast(m_TabPiece.obj()); + return (LwpTabOverride*)(pPiece ? pPiece->GetOverride() : NULL); + } return NULL; } else if( !m_BasedOnStyle.IsNull() ) -- cgit