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

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


 lotuswordpro/source/filter/lwpfribptr.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit ec066b44392f8ed1015540220b6b4620facd873e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 23 15:33:36 2015 +0000

    guard against missing DropcapMgr and Foundry
    
    Change-Id: I1007d4fac2514bc165941c70109cd8e3d57153cd
    (cherry picked from commit 330127baf96c417e0eeaef9808d124788b547cf3)
    (cherry picked from commit e616ff7e29ee10d0c3ea2dc6a8fc135b87b572b7)
    Reviewed-on: https://gerrit.libreoffice.org/20910
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/lotuswordpro/source/filter/lwpfribptr.cxx b/lotuswordpro/source/filter/lwpfribptr.cxx
index 79486a2..e69b508 100644
--- a/lotuswordpro/source/filter/lwpfribptr.cxx
+++ b/lotuswordpro/source/filter/lwpfribptr.cxx
@@ -288,10 +288,15 @@ void LwpFribPtr::XFConvert()
             LwpFribFrame* frameFrib= static_cast<LwpFribFrame*>(pFrib);
             rtl::Reference<LwpObject> pLayout = frameFrib->GetLayout();
             if (pLayout.is() && pLayout->GetTag() == VO_DROPCAPLAYOUT)
-                m_pPara->GetFoundry()->GetDropcapMgr()->SetXFPara(m_pXFPara);
+            {
+                LwpFoundry* pFoundry = m_pPara->GetFoundry();
+                LwpDropcapMgr* pMgr = pFoundry ? pFoundry->GetDropcapMgr() : nullptr;
+                if (pMgr)
+                    pMgr->SetXFPara(m_pXFPara);
+            }
             frameFrib->XFConvert(m_pXFPara);
-        }
             break;
+        }
         case FRIB_TAG_CHBLOCK:
         {
             LwpFribCHBlock* chbFrib = static_cast<LwpFribCHBlock*>(pFrib);


More information about the Libreoffice-commits mailing list