summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2011-11-12 11:15:19 +0000
committerMichael Meeks <michael.meeks@suse.com>2011-11-15 11:11:28 +0000
commitaa0b7b033098bfc1bf3f06cd112691abc862bd20 (patch)
treefb553c37fa42bd5ced88f3db8c0e2606346db4c5 /sw
parentbd3ad390fe76cf0594165233a8304a8f7c96ca77 (diff)
avoid crasher from unusual odt document fdo#42785
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/xml/xmltexti.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 291665e2db6d..11dcd4f031c9 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -206,7 +206,7 @@ sal_Bool SwXMLTextImportHelper::IsInHeaderFooter() const
OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" );
- SwDoc *pDoc = pTxtCrsr->GetDoc();
+ SwDoc *pDoc = pTxtCrsr ? pTxtCrsr->GetDoc() : NULL;
return pDoc && pDoc->IsInHeaderFooter( pTxtCrsr->GetPaM()->GetPoint()->nNode );
}