diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 13:30:02 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-12-10 16:14:34 +0100 |
commit | 54b97c6984fc6e93d9966ea305a158be4a3c6dd3 (patch) | |
tree | bd5bb089053c465793b4b55a88cfa5b557b1ac5c /lotuswordpro | |
parent | 410bd50600a1d087b39bfe5be5dbc3da48273408 (diff) |
guard against no default text style
Change-Id: I7416d709de79ae88cf4a9546d8adfecec9935238
(cherry picked from commit 80297dd0f21bfeaa9bae09cacfa29ab2eee64c09)
Reviewed-on: https://gerrit.libreoffice.org/20529
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
(cherry picked from commit da794ce092673fcfd1311cb9a218098a400682e3)
Diffstat (limited to 'lotuswordpro')
-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 16f873777ee0..dfb41788306f 100644 --- a/lotuswordpro/source/filter/lwptoc.cxx +++ b/lotuswordpro/source/filter/lwptoc.cxx @@ -130,7 +130,8 @@ void LwpTocSuperLayout::RegisterStyle() LwpSuperTableLayout::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())); + const LwpObjectID *pDefaultTextStyle = m_pFoundry->GetDefaultTextStyle(); + XFParaStyle* pBaseStyle = pDefaultTextStyle ? static_cast<XFParaStyle*>(m_pFoundry->GetStyleManager()->GetStyle(*pDefaultTextStyle)) : nullptr; XFTextStyle*pTextStyle = new XFTextStyle; if (pBaseStyle) pTextStyle->SetFont(pBaseStyle->GetFont()); // who delete this font????? |