From 00bccc565d1bcd4bd620bb9b33b9f1d07fb5f13e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 13 Dec 2015 17:40:36 +0000 Subject: font might be null Change-Id: Id0d9bb1d1abe6f6c9440bf979407d13db49696c4 --- lotuswordpro/source/filter/lwptablelayout.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'lotuswordpro/source') diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index 97835316c1c4..85ff88561338 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -1222,14 +1222,17 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_ if (bColorMod) { - rtl::Reference pFont = pOverStyle->GetFont(); - XFColor aColor = pFont->GetColor(); - if ( aColor == aNullColor ) + rtl::Reference xFont = pOverStyle->GetFont(); + if (xFont.is()) { - rtl::Reference pNewFont = new XFFont; - aColor = pNumStyle->GetColor(); - pNewFont->SetColor(aColor); - pOverStyle->SetFont(pNewFont); + XFColor aColor = xFont->GetColor(); + if ( aColor == aNullColor ) + { + rtl::Reference pNewFont = new XFFont; + aColor = pNumStyle->GetColor(); + pNewFont->SetColor(aColor); + pOverStyle->SetFont(pNewFont); + } } } -- cgit