diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 13:30:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 13:30:02 +0000 |
commit | 80297dd0f21bfeaa9bae09cacfa29ab2eee64c09 (patch) | |
tree | 9df5635beb0b1e7b460b27d4e428564d6d20dc5b | |
parent | 7e48820cabeb128258ce4340df8d4411bad442b9 (diff) |
guard against no default text style
Change-Id: I7416d709de79ae88cf4a9546d8adfecec9935238
-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 c3bfd7886def..9650d7f2d962 100644 --- a/lotuswordpro/source/filter/lwptoc.cxx +++ b/lotuswordpro/source/filter/lwptoc.cxx @@ -125,7 +125,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????? |