sw/source/core/text/xmldump.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 60d37294291a2aaccc9fd84de49a7b9d30f2db0b
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Tue Feb 4 13:42:42 2020 +0100
Commit:     Michael Stahl <michael.st...@cib.de>
CommitDate: Wed Feb 5 10:39:58 2020 +0100

    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.st...@cib.de>

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>));
             }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to