[Libreoffice-commits] core.git: sd/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Aug 29 16:44:02 UTC 2017


 sd/source/ui/view/drviewsa.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 5c088880c871a510b6e4b703f01ff42bce104e5f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Aug 29 15:38:59 2017 +0200

    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 at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

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()


More information about the Libreoffice-commits mailing list