summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2015-04-14 09:54:12 +0200
committerDavid Tardon <dtardon@redhat.com>2015-04-14 09:58:20 +0200
commit25c25f855169c98c30f3f7868fd1ad430e159ddc (patch)
tree355fee8781c720c430bf48f36fe7c9027f94895a /lotuswordpro
parentef0340bdafabd51598ad7cf3c647cd35ea09f4e9 (diff)
tdf#90028 avoid crash if style is not found
Change-Id: I4ffc8cdcb67ecb4c4afa641c9219dd465fe13d29
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwptablelayout.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index 90897ad92c37..99d8b1872a11 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -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)
{