[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/source

Henry Castro hcastro at collabora.com
Mon Jul 9 13:47:02 UTC 2018


 sw/source/uibase/app/docsh2.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 8dd5be05ae7ed825af4fc99604f9772f0f60003c
Author: Henry Castro <hcastro at collabora.com>
Date:   Thu Jul 5 15:28:06 2018 -0400

    tdf#118540: LO6.1b2: DOCX crashes when properties...
    
    are opened in print preview mode
    
    Change-Id: Idc64d2b98dff157d28813dd3f90a276f8cacd11f
    Reviewed-on: https://gerrit.libreoffice.org/57024
    Tested-by: Jenkins
    Reviewed-by: Henry Castro <hcastro at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/57059
    Reviewed-by: Aron Budea <aron.budea at collabora.com>
    Tested-by: Aron Budea <aron.budea at collabora.com>

diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 93a65fad30ff..3a904826e90c 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -139,7 +139,9 @@ using namespace ::sfx2;
 // create DocInfo (virtual)
 VclPtr<SfxDocumentInfoDialog> SwDocShell::CreateDocumentInfoDialog(const SfxItemSet &rSet)
 {
-    VclPtr<SfxDocumentInfoDialog> pDlg = VclPtr<SfxDocumentInfoDialog>::Create(&GetView()->GetViewFrame()->GetWindow(), rSet);
+    SfxViewShell* pViewShell = GetView() ? GetView() : SfxViewShell::Current();
+    vcl::Window* pWindow = pViewShell ? &pViewShell->GetViewFrame()->GetWindow() : nullptr;
+    VclPtr<SfxDocumentInfoDialog> pDlg = VclPtr<SfxDocumentInfoDialog>::Create(pWindow, rSet);
     //only with statistics, when this document is being shown, not
     //from within the Doc-Manager
     SwDocShell* pDocSh = static_cast<SwDocShell*>( SfxObjectShell::Current());


More information about the Libreoffice-commits mailing list