summaryrefslogtreecommitdiff
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-10 19:47:00 +0100
commitf688f86350b627282c85685b025fc7500e434b6c (patch)
tree5b1b7377e91fda6e6f5e30da97276a14cbfad5d3
parenta761b1a661fd8068084f9cd74d47b9b8016740de (diff)
tdf#120991 sw_redlinehide_3: fix crash when storing clipboard document
It doesn't have a layout, of course. Change-Id: Iec4809ec4a14e1fa9852d09619a8b344419b29e7
-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
{