Kaydet (Commit) 240b3f5b authored tarafından Caolán McNamara's avatar Caolán McNamara

guard against missing BaseStyle

Change-Id: I173b12f0a28f917f24d1923e531da1b798beb1f6
(cherry picked from commit d34cbe27)
Reviewed-on: https://gerrit.libreoffice.org/20522Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst cb43146c
......@@ -127,7 +127,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();
......
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