[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sd/source

Michael Meeks michael at kemper.freedesktop.org
Wed Nov 16 14:17:47 PST 2011


 sd/source/ui/slideshow/slideshowimpl.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 9bd7655d4bf1df440ed6af11c213bfa346b5b287
Author: Thorsten Behrens <tbehrens at suse.com>
Date:   Wed Nov 16 12:37:04 2011 +0100

    Fix slideshow crasher
    
    Recursive event loop killed SlideshowImpl object under my hands -
    make it stay until we pop out of callstack again.
    
    Signed-off-by: Michael Meeks <michael.meeks at suse.com>

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 8a400d2..9320719 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1881,6 +1881,9 @@ IMPL_LINK( SlideshowImpl, updateHdl, Timer*, EMPTYARG )
 
 IMPL_LINK( SlideshowImpl, PostYieldListener, void*, EMPTYARG )
 {
+    // prevent me from deletion when recursing (App::Reschedule does)
+    const rtl::Reference<SlideshowImpl> this_(this);
+
     Application::EnableNoYieldMode(false);
     Application::RemovePostYieldListener(LINK(this, SlideshowImpl, PostYieldListener));
     Application::Reschedule(true); // fix for fdo#32861 - process
@@ -1896,7 +1899,7 @@ IMPL_LINK( SlideshowImpl, PostYieldListener, void*, EMPTYARG )
 
 sal_Int32 SlideshowImpl::updateSlideShow (void)
 {
-    // doing some nMagic
+    // prevent me from deletion when recursing (App::EnableYieldMode does)
     const rtl::Reference<SlideshowImpl> this_(this);
 
     Reference< XSlideShow > xShow( mxShow );


More information about the Libreoffice-commits mailing list