incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1341841 - /incubator/ooo/trunk/main/sd/source/ui/slideshow/slideshowimpl.cxx
Date Wed, 23 May 2012 11:58:05 GMT
Author: af
Date: Wed May 23 11:58:05 2012
New Revision: 1341841

URL: http://svn.apache.org/viewvc?rev=1341841&view=rev
Log:
#i118879# Prevent SlideshowImpl from being destroyed in the midle of PostYieldListener.

Modified:
    incubator/ooo/trunk/main/sd/source/ui/slideshow/slideshowimpl.cxx

Modified: incubator/ooo/trunk/main/sd/source/ui/slideshow/slideshowimpl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/slideshow/slideshowimpl.cxx?rev=1341841&r1=1341840&r2=1341841&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/slideshow/slideshowimpl.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/slideshow/slideshowimpl.cxx Wed May 23 11:58:05
2012
@@ -1907,10 +1907,20 @@ IMPL_LINK( SlideshowImpl, PostYieldListe
 {
     Application::EnableNoYieldMode(false);
     Application::RemovePostYieldListener(LINK(this, SlideshowImpl, PostYieldListener));
+
     if (mbDisposed)
         return 0;
+
+    // Call Reschedule() but make sure that we are not destroyed during its
+    // execution (we still can be disposed, though.)
+    const rtl::Reference<SlideshowImpl> pSelf (this);
     Application::Reschedule(true);
-    return updateSlideShow();
+
+    // Update the slide show if we are still alive.
+    if ( ! mbDisposed)
+        return updateSlideShow();
+    else
+        return 0;
 }
 
 



Mime
View raw message