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

Caolán McNamara caolanm at redhat.com
Thu Dec 17 08:01:41 PST 2015


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

New commits:
commit f1c1380c3257b27c558145a33c7b6d6e0fdf2957
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 17 10:52:13 2015 +0000

    guard against null Foundry
    
    Change-Id: I8aabc68e8dfb9376cafe4cc709b18344da083a01
    (cherry picked from commit 2f0fba494e78ede3b6691534983f6dd7e0677a7e)
    (cherry picked from commit 51a1b41ab4a840544e5454d1d4234b443edd5466)
    Reviewed-on: https://gerrit.libreoffice.org/20755
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx
index e1a9b8c..d578007 100644
--- a/lotuswordpro/source/filter/lwpfrib.cxx
+++ b/lotuswordpro/source/filter/lwpfrib.cxx
@@ -250,14 +250,14 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
     m_StyleName.clear();
     XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
     XFTextStyle* pNamedStyle = nullptr;
-    if (m_pModifiers->HasCharStyle)
+    if (m_pModifiers->HasCharStyle && pFoundry)
     {
         pNamedStyle = static_cast<XFTextStyle*>
                                 (pFoundry->GetStyleManager()->GetStyle(m_pModifiers->CharStyleID));
     }
     if (pNamedStyle)
     {
-        if (m_pModifiers->FontID)
+        if (m_pModifiers->FontID && pFoundry)
         {
             pStyle = new XFTextStyle();
             *pStyle = *pNamedStyle;
@@ -277,7 +277,7 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
     }
     else
     {
-        if (m_pModifiers->FontID)
+        if (m_pModifiers->FontID && pFoundry)
         {
             pStyle = new XFTextStyle();
             pFont = pFoundry->GetFontManger().CreateFont(m_pModifiers->FontID);


More information about the Libreoffice-commits mailing list