summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-18 16:08:16 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-05-23 08:38:25 +0000
commit0212bf7e832ad8edfdc8d1eee2f222a99eb41429 (patch)
tree27bdb7a8feaf51e7a688e3ffbbe04b377c7d6117
parent83c3c4d46d7185856041be3d9da660aaceff8799 (diff)
Resolves: tdf#95620 crash in presentation wizard
possibly a regression from VclPtr or maybe from VclBuilder, or a bit of both. Change-Id: I46acf07e219334547429da7b2983d5be9cdb6ef8 (cherry picked from commit 1ea14bb0bbb7ca79c0a60a1041243bbebda31e18) Reviewed-on: https://gerrit.libreoffice.org/25112 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sd/source/ui/dlg/dlgass.cxx6
-rw-r--r--sd/source/ui/dlg/docprev.cxx6
2 files changed, 12 insertions, 0 deletions
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index c6687cad1dcf..5bb117fc46b1 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -656,6 +656,12 @@ AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link<ListBox&,vo
AssistentDlgImpl::~AssistentDlgImpl()
{
+ //tdf#95620 we need to have mpPreview disposed before the DocShell is
+ //destroyed, and not after. Because if the preview's slideshow is active
+ //then the slideshow accesses the medium belonging to this DocShell in
+ //its disposing.
+ mpPreview.disposeAndClear();
+
CloseDocShell();
DeletePasswords();
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 7e25a5a6ced2..cc1f3bb44151 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -89,7 +89,13 @@ SdDocPreviewWin::~SdDocPreviewWin()
void SdDocPreviewWin::dispose()
{
+ if (mxSlideShow.is())
+ {
+ mxSlideShow->end();
+ mxSlideShow.clear();
+ }
delete pMetaFile;
+ pMetaFile = nullptr;
Control::dispose();
}