summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2018-07-05 15:28:06 -0400
committerHenry Castro <hcastro@collabora.com>2018-07-06 14:15:32 +0200
commitd778140cca4c1a0b63531f46ea6c5df716e47b98 (patch)
treecaed1d52715859b3edd7dc9f9cd60cac59c7e726
parentff002524c12471668e63837a804b6006f9136a34 (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>
-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 ab4c22a5b718..7c210e6a468d 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -145,7 +145,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());