From 30426feff508439f79b2737cba94637d66ee7691 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Mon, 22 Apr 2013 16:20:25 +0200 Subject: n#382137: Band-aid to avoid crash when saving the .odt to .docx. Change-Id: I6994da8a79cd7d6ca559ca41823a912381bdd61e --- sw/source/filter/ww8/wrtw8nds.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sw') diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index c042bfe1bc2d..717af4790d49 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1777,11 +1777,14 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) if( !aIdx.GetNode().IsTxtNode() ) { const SwSectionNode* pTOXSectNd = rNode.FindSectionNode(); - pTOXSect = &pTOXSectNd->GetSection(); + if ( pTOXSectNd ) + { + pTOXSect = &pTOXSectNd->GetSection(); - const SwNode* pNxt = rNode.GetNodes().GoNext( &aIdx ); - if( pNxt && pNxt->FindSectionNode() == pTOXSectNd ) - pTOXSect = 0; + const SwNode* pNxt = rNode.GetNodes().GoNext( &aIdx ); + if( pNxt && pNxt->FindSectionNode() == pTOXSectNd ) + pTOXSect = 0; + } } } -- cgit