diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-02-04 13:42:42 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-02-05 10:39:58 +0100 |
commit | 60d37294291a2aaccc9fd84de49a7b9d30f2db0b (patch) | |
tree | d1ba542c7a00f662ad1d943a8e8f638fe435cabd /sw | |
parent | 7d08664be4d9a949718ce66e3bc974105a10284c (diff) |
sw: fix crash in SwFrame::dumpAsXml()
when called from SfxObjectShell::GetPreviewMetaFile(), GetSfxViewShell()
is null apparently.
Change-Id: Id9f6b14fc044b97eb96f671dfded26f9cb96db22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87984
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/xmldump.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index 3db640cb4774..e7e32aef586b 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -324,7 +324,7 @@ void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const SwView* pView = static_cast<SwView*>(SfxViewShell::GetFirst(true, checkSfxViewShell<SwView>)); while (pView) { - if (pView->GetObjectShell() == pRootFrame->GetCurrShell()->GetSfxViewShell()->GetObjectShell()) + if (pRootFrame->GetCurrShell()->GetSfxViewShell() && pView->GetObjectShell() == pRootFrame->GetCurrShell()->GetSfxViewShell()->GetObjectShell()) pView->dumpAsXml(writer); pView = static_cast<SwView*>(SfxViewShell::GetNext(*pView, true, checkSfxViewShell<SwView>)); } |