From c7ae5af3d8e362986f3a8ccc612e0b4370e9d199 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Thu, 21 Feb 2013 17:44:46 +0100 Subject: fix NULL dereference Only the Clang tinderbox fails here for some reason, but e.g. code in ww8par5.cxx check for non-NULL too, so it's apparently possible. Change-Id: I985445f7727560116813aacbca40c0e7c0a4863f --- sw/source/filter/ww8/docxattributeoutput.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 7d3dc92929ed..8a6e8bbbff0d 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2006,12 +2006,14 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer if (aPam.GetPoint()->nNode.GetNode().IsTxtNode()) { const SwTxtNode& rTxtNode = (const SwTxtNode&)aPam.GetPoint()->nNode.GetNode(); - const SwAttrSet* pAttrSet = rTxtNode.GetpSwAttrSet(); - const SvxCharRotateItem& rCharRotate = pAttrSet->GetCharRotate(); - if (rCharRotate.GetValue() == 900) + if( const SwAttrSet* pAttrSet = rTxtNode.GetpSwAttrSet()) { - m_pSerializer->singleElementNS( XML_w, XML_textDirection, FSNS( XML_w, XML_val ), "btLr", FSEND ); - m_bBtLr = true; + const SvxCharRotateItem& rCharRotate = pAttrSet->GetCharRotate(); + if (rCharRotate.GetValue() == 900) + { + m_pSerializer->singleElementNS( XML_w, XML_textDirection, FSNS( XML_w, XML_val ), "btLr", FSEND ); + m_bBtLr = true; + } } } } -- cgit