Kaydet (Commit) 80297dd0 authored tarafından Caolán McNamara's avatar Caolán McNamara

guard against no default text style

Change-Id: I7416d709de79ae88cf4a9546d8adfecec9935238
üst 7e48820c
......@@ -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?????
......
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