diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-19 12:43:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-19 12:54:24 +0000 |
commit | 1276f6daf28f61d911da9885e0cac738931e4de4 (patch) | |
tree | 644d24fff7a4924a04466808752e734aa49c2201 /lotuswordpro | |
parent | c2f1731685014b9df386dfb59900783c3ca3acb7 (diff) |
coverity#1343627 Unchecked dynamic_cast
Change-Id: I83c0febcbbf0f19a05818e0575921d1d6254935f
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpfrib.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx index 2c69886ff64f..230437b225f6 100644 --- a/lotuswordpro/source/filter/lwpfrib.cxx +++ b/lotuswordpro/source/filter/lwpfrib.cxx @@ -253,11 +253,13 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry) } if (pNamedStyle) { + LwpCharacterStyle* pCharStyle = nullptr; if (m_pModifiers->FontID && pFoundry) + pCharStyle = dynamic_cast<LwpCharacterStyle*>(m_pModifiers->CharStyleID.obj().get()); + if (pCharStyle) { pStyle = new XFTextStyle(); *pStyle = *pNamedStyle; - LwpCharacterStyle* pCharStyle = dynamic_cast<LwpCharacterStyle*>(m_pModifiers->CharStyleID.obj().get()); pStyle->SetStyleName(""); pFont = pFoundry->GetFontManger().CreateOverrideFont(pCharStyle->GetFinalFontID(),m_pModifiers->FontID); |