[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - lotuswordpro/source

Caolán McNamara caolanm at redhat.com
Fri Oct 9 05:00:08 PDT 2015


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

New commits:
commit 425ee54728ae290ef9e51e63fa79432e6250486a
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
    (cherry picked from commit cc1273543f4084a779a2b0400c22466672557a95)
    Reviewed-on: https://gerrit.libreoffice.org/19242
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx
index f930660..d88ec39 100644
--- a/lotuswordpro/source/filter/lwpfrib.cxx
+++ b/lotuswordpro/source/filter/lwpfrib.cxx
@@ -249,10 +249,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