You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by af...@apache.org on 2012/05/23 13:58:05 UTC
svn commit: r1341841 -
/incubator/ooo/trunk/main/sd/source/ui/slideshow/slideshowimpl.cxx
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;
}