Kaydet (Commit) da794ce0 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) David Tardon

guard against no default text style

Change-Id: I7416d709de79ae88cf4a9546d8adfecec9935238
(cherry picked from commit 80297dd0)
Reviewed-on: https://gerrit.libreoffice.org/20529Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst 7a721b41
......@@ -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?????
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment