[Libreoffice-commits] core.git: lotuswordpro/source

Caolán McNamara caolanm at redhat.com
Thu Oct 8 02:52:04 PDT 2015


 lotuswordpro/source/filter/lwpfrib.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit cc1273543f4084a779a2b0400c22466672557a95
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 8 10:50:23 2015 +0100

    Resolves: tdf#93818 crash on loading certain lwp
    
    Change-Id: I11f523a0936b843155f3b47139d0fc58d4d0342b

diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx
index 7d5bbb5..c6c3160 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<XFTextStyle*>
+        pNamedStyle = static_cast<XFTextStyle*>
                                 (pFoundry->GetStyleManager()->GetStyle(m_pModifiers->CharStyleID));
+    }
+    if (pNamedStyle)
+    {
         if (m_pModifiers->FontID)
         {
             pStyle = new XFTextStyle();


More information about the Libreoffice-commits mailing list