summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-21 16:47:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-21 16:49:16 +0100
commitfb5b2c5580a247a2f6935e66dbcb48e16e291e87 (patch)
tree8f6a2ec4545002a6c41a7b17ed2cf6d0e684d93c
parentf4294091b997d9118617f0bbb82b1cafe3cf993b (diff)
afl-eventtesting: crash if you close shell behind running presentation
Change-Id: Ib8f02ddfe3b74e97145e22aa88e6f97d52c39f7a
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx6
-rw-r--r--vcl/qa/afl-eventtesting/eventtesting.impress.crash-2bin0 -> 110 bytes
2 files changed, 6 insertions, 0 deletions
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 4fa70785224d..966e7772f1c2 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -33,6 +33,7 @@
#include "app.hrc"
#include "strings.hrc"
#include "glob.hrc"
+#include "slideshow.hxx"
#include "unokywds.hxx"
#include <svx/svxids.hrc>
#include "DrawDocShell.hxx"
@@ -263,6 +264,11 @@ ViewShellBase::ViewShellBase (
*/
ViewShellBase::~ViewShellBase()
{
+ rtl::Reference<SlideShow> xSlideShow(SlideShow::GetSlideShow(*this));
+ if (xSlideShow.is() && xSlideShow->dependsOn(this))
+ SlideShow::Stop(*this);
+ xSlideShow.clear();
+
// Tell the controller that the ViewShellBase is not available anymore.
if (mpImpl->mpController.get() != NULL)
mpImpl->mpController->ReleaseViewShellBase();
diff --git a/vcl/qa/afl-eventtesting/eventtesting.impress.crash-2 b/vcl/qa/afl-eventtesting/eventtesting.impress.crash-2
new file mode 100644
index 000000000000..d312939e4797
--- /dev/null
+++ b/vcl/qa/afl-eventtesting/eventtesting.impress.crash-2
Binary files differ