summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-29 15:38:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-29 18:39:29 +0200
commit5c088880c871a510b6e4b703f01ff42bce104e5f (patch)
tree3077e3c0594442081db25a0298fe38f95c624395
parent9b3813cdbf79366379a783596e5223624a03a5d4 (diff)
tdf#112008 Assert when starting an empty slideshow
Init() is called via at least two different code patchs, from BasicViewFactory::CreateView and PresentationViewShell::FinishInitialization. But we only call EndListening() once in the destructor, so lets just check before calling StartListening() Change-Id: Ia6757a17934cc2665c635e21ee0305a810c624c1 Reviewed-on: https://gerrit.libreoffice.org/41701 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sd/source/ui/view/drviewsa.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 596c6ba84f35..074ad05157b1 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -341,7 +341,8 @@ void DrawViewShell::Init (bool bIsMainViewShell)
{
ViewShell::Init(bIsMainViewShell);
- StartListening (*GetDocSh());
+ if (!IsListening(*GetDocSh()))
+ StartListening (*GetDocSh());
}
void DrawViewShell::Shutdown()