From 25c25f855169c98c30f3f7868fd1ad430e159ddc Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 14 Apr 2015 09:54:12 +0200 Subject: [PATCH] tdf#90028 avoid crash if style is not found Change-Id: I4ffc8cdcb67ecb4c4afa641c9219dd465fe13d29 --- lotuswordpro/source/filter/lwptablelayout.cxx | 12 ++++++++---- 1 file 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) {