diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 13:00:24 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-12-10 10:24:25 +0100 |
commit | b9ab690495bf3f870b621fa82f526c79fdcc5f21 (patch) | |
tree | 7ecfd1f2f58f2556fea6b643fe2b277bf0bc7527 | |
parent | 1795c4eda3e0a76fa4983e4e41471c4547e3080c (diff) |
guard against missing BaseStyle
Change-Id: I173b12f0a28f917f24d1923e531da1b798beb1f6
(cherry picked from commit d34cbe279cc8e1db941a4da1130d5a6d7429357d)
Reviewed-on: https://gerrit.libreoffice.org/20523
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r-- | lotuswordpro/source/filter/lwptoc.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx index 2020e9350cb7..f6fed0966223 100644 --- a/lotuswordpro/source/filter/lwptoc.cxx +++ b/lotuswordpro/source/filter/lwptoc.cxx @@ -132,7 +132,8 @@ void LwpTocSuperLayout::RegisterStyle() // Get font info of default text style and set into tab style XFParaStyle* pBaseStyle = static_cast<XFParaStyle*>(m_pFoundry->GetStyleManager()->GetStyle(*m_pFoundry->GetDefaultTextStyle())); XFTextStyle*pTextStyle = new XFTextStyle; - pTextStyle->SetFont(pBaseStyle->GetFont()); // who delete this font????? + if (pBaseStyle) + pTextStyle->SetFont(pBaseStyle->GetFont()); // who delete this font????? XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); m_TabStyleName = pXFStyleManager->AddStyle(pTextStyle).m_pStyle->GetStyleName(); |