# HG changeset patch
# User Michael Stahl <mst@openoffice.org>
# Date 1303140561 0
# Node ID 7fb88ce21711c0e03da80bf53f6836ff9d833c51
# Parent  2ebd15d9e8a637b5c563f1ae49768668412e2baa
rtftok01: writerfilter: DomainMapper.cxx: check pContext

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -4483,7 +4483,8 @@
             m_pImpl->clearDeferredBreaks();
         }
 
-        if( pContext->GetFootnote().is() && m_pImpl->IsCustomFtnMark() )
+        if (pContext && pContext->GetFootnote().is()
+            && m_pImpl->IsCustomFtnMark())
         {
             pContext->GetFootnote()->setLabel( sText );
             m_pImpl->SetCustomFtnMark( false );
