[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sw/source
Michael Weghorn
m.weghorn at posteo.de
Sun May 15 09:46:29 UTC 2016
sw/source/filter/ww8/ww8atr.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit d19b0fd3525aefd1c7d1b8b6564c77ffffede4e2
Author: Michael Weghorn <m.weghorn at 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 <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit adc0ced6533449f33473db560b8ba27d4bd326f9)
Reviewed-on: https://gerrit.libreoffice.org/25001
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 9523b92..ca7e895 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 )
More information about the Libreoffice-commits
mailing list