Kaydet (Commit) 7e341379 authored tarafından Caolán McNamara's avatar Caolán McNamara

guard against missing alignment property

Change-Id: I1d4825c2136e516baf759f4b2c40c911547b93d7
üst 0cde3ca2
......@@ -380,18 +380,22 @@ void LwpPara::RegisterStyle()
{
case PP_LOCAL_ALIGN:
{
if (!rParaStyle.GetAlignment())
OverrideAlignment(nullptr,static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment(),pOverStyle);
else
LwpAlignmentOverride *pAlignment = static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment();
if (pAlignment)
{
std::unique_ptr<LwpAlignmentOverride> const pAlign(
rParaStyle.GetAlignment()->clone());
OverrideAlignment(pAlign.get(),
static_cast<LwpParaAlignProperty*>(pProps)->GetAlignment(),
pOverStyle);
if (!rParaStyle.GetAlignment())
OverrideAlignment(nullptr, pAlignment, pOverStyle);
else
{
std::unique_ptr<LwpAlignmentOverride> const pAlign(
rParaStyle.GetAlignment()->clone());
OverrideAlignment(pAlign.get(),
pAlignment,
pOverStyle);
}
}
}
break;
}
case PP_LOCAL_INDENT:
{
noIndent = false;
......
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