summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-09 13:00:24 +0000
committerMichael Stahl <mstahl@redhat.com>2015-12-10 15:20:32 +0000
commitb1d710430aa8ea49664cc766504eb6260a2ef7cd (patch)
tree8e0ed7486d03288827a9ee60062bf147a2f82332
parent98001e6df082f17643d12afba5b6d862a9174771 (diff)
guard against missing BaseStyle
Change-Id: I173b12f0a28f917f24d1923e531da1b798beb1f6 (cherry picked from commit d34cbe279cc8e1db941a4da1130d5a6d7429357d) Reviewed-on: https://gerrit.libreoffice.org/20524 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--lotuswordpro/source/filter/lwptoc.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx
index 75b9aa7ef7fa..16f873777ee0 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();