sw/source/filter/ww8/ww8atr.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit adc0ced6533449f33473db560b8ba27d4bd326f9 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Sat May 14 17:16:12 2016 +0200 tdf#99699 Do nullptr check BEFORE calling method This fixes a segmentation fault accidently introduced with commit a1fb4ac1991a8da2e527b64a0a01a88a8f2959e3. Change-Id: I244e325934db22e1bffd03486cc5e84f539101f2 Reviewed-on: https://gerrit.libreoffice.org/24994 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 6c4cab4..5cd5297 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -852,9 +852,10 @@ bool MSWordExportBase::HasRefToObject( sal_uInt16 nTyp, const OUString* pName, s SwIterator<SwFormatField, SwFieldType> aFormatFields( *pType ); for ( SwFormatField* pFormatField = aFormatFields.First(); pFormatField; pFormatField = aFormatFields.Next() ) { - const SwTextNode* pNd = pFormatField->GetTextField()->GetpTextNode(); + const SwTextNode* pNd; if ( pFormatField->GetTextField() && nTyp == pFormatField->GetField()->GetSubType() && - nullptr != pNd && pNd->GetNodes().IsDocNodes() ) + nullptr != ( pNd = pFormatField->GetTextField()->GetpTextNode() ) && + pNd->GetNodes().IsDocNodes() ) { const SwGetRefField& rRField = *static_cast< SwGetRefField* >( pFormatField->GetField() ); switch ( nTyp ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits