summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/wrtw8sty.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8/wrtw8sty.cxx')
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 9f103627d576..4126b9f88a50 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -2087,6 +2087,10 @@ void MSWordExportBase::WriteHeaderFooterText( const SwFormat& rFormat, bool bHea
m_bHasHdr = true;
const SwFormatHeader& rHd = rFormat.GetHeader();
OSL_ENSURE( rHd.GetHeaderFormat(), "Header text is not here" );
+
+ if ( !rHd.GetHeaderFormat() )
+ return;
+
pContent = &rHd.GetHeaderFormat()->GetContent();
}
else
@@ -2094,6 +2098,10 @@ void MSWordExportBase::WriteHeaderFooterText( const SwFormat& rFormat, bool bHea
m_bHasFtr = true;
const SwFormatFooter& rFt = rFormat.GetFooter();
OSL_ENSURE( rFt.GetFooterFormat(), "Footer text is not here" );
+
+ if ( !rFt.GetFooterFormat() )
+ return;
+
pContent = &rFt.GetFooterFormat()->GetContent();
}