summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2018-07-05 15:28:06 -0400
committerAron Budea <aron.budea@collabora.com>2018-07-09 14:35:37 +0200
commit046f62db2e6a8092e84fa7c3e82e12cce1d52eb4 (patch)
treeacaf03583688330b352da165f01ee1ea35bd9c7d
parent633a96c4c6136a1775f76c10bf689e8a665986bc (diff)
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@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/57058 Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com>
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index a8c0f522c9d2..b3ebbb11727e 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -140,7 +140,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());