tdf#90028 avoid crash if style is not found

Change-Id: I4ffc8cdcb67ecb4c4afa641c9219dd465fe13d29
This commit is contained in:
David Tardon
2015-04-14 09:54:12 +02:00
parent ef0340bdaf
commit 25c25f8551

View File

@@ -1201,13 +1201,17 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_
}
XFParaStyle * pStyle = pXFStyleManager->FindParaStyle(pXFPara->GetStyleName());
if (pStyle->GetNumberRight() || bColorMod)
if ((pStyle && pStyle->GetNumberRight()) || bColorMod)
{
XFParaStyle* pOverStyle = new XFParaStyle;
*pOverStyle = *pStyle;
if (pStyle->GetNumberRight())
pOverStyle->SetAlignType(enumXFAlignEnd);
if (pStyle)
{
*pOverStyle = *pStyle;
if (pStyle->GetNumberRight())
pOverStyle->SetAlignType(enumXFAlignEnd);
}
if (bColorMod)
{