diff options
author | Henry Castro <hcastro@collabora.com> | 2018-07-05 15:28:06 -0400 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-07-11 10:58:54 +0200 |
commit | 6f89e62cb7d4d32ad321840bd1887e7226c62cce (patch) | |
tree | 5d20836b6767aaa9ef36f465c1a61b54af541fff | |
parent | 39ba5e3bde93358af1b363da8f850bdc96806cfa (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/57057
Tested-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 07afee0fcd64..c9678c6b9836 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()); |