diff options
-rw-r--r-- | sd/source/ui/dlg/dlgass.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/docprev.cxx | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 5f4a8caed73b..95caa0e7990a 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(); } |