summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/wrtxml.cxx
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-10-12 16:33:00 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-11-15 15:09:59 +0100
commit57aa6493b36a0f7c153e64fecca623f6136a160b (patch)
tree2099d33a270217e8911423eafa0aba7c92f8a216 /sw/source/filter/xml/wrtxml.cxx
parentefb39f9a89ce314cc016614b2d295f35808373ea (diff)
tdf#120991 sw_redlinehide_3: fix crash when storing clipboard document
It doesn't have a layout, of course. Change-Id: Iec4809ec4a14e1fa9852d09619a8b344419b29e7
Diffstat (limited to 'sw/source/filter/xml/wrtxml.cxx')
-rw-r--r--sw/source/filter/xml/wrtxml.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index df75d14868db..0d5e53d4c319 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -189,7 +189,8 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS
bool isShowChanges;
if (officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
{ // TODO: ideally this would be stored per-view...
- isShowChanges = !m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->IsHideRedlines();
+ SwRootFrame const*const pLayout(m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout());
+ isShowChanges = pLayout == nullptr || !pLayout->IsHideRedlines();
}
else
{