From cc1273543f4084a779a2b0400c22466672557a95 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 8 Oct 2015 10:50:23 +0100 Subject: Resolves: tdf#93818 crash on loading certain lwp Change-Id: I11f523a0936b843155f3b47139d0fc58d4d0342b --- lotuswordpro/source/filter/lwpfrib.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lotuswordpro') diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx index 7d5bbb5947d1..c6c31601ca13 100644 --- a/lotuswordpro/source/filter/lwpfrib.cxx +++ b/lotuswordpro/source/filter/lwpfrib.cxx @@ -245,10 +245,14 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry) XFTextStyle* pStyle = NULL; m_StyleName.clear(); XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); + XFTextStyle* pNamedStyle = nullptr; if (m_pModifiers->HasCharStyle) { - XFTextStyle* pNamedStyle = static_cast + pNamedStyle = static_cast (pFoundry->GetStyleManager()->GetStyle(m_pModifiers->CharStyleID)); + } + if (pNamedStyle) + { if (m_pModifiers->FontID) { pStyle = new XFTextStyle(); -- cgit