diff options
author | Andre Fischer <af@apache.org> | 2012-05-23 10:58:05 +0000 |
---|---|---|
committer | Andre Fischer <af@apache.org> | 2012-05-23 10:58:05 +0000 |
commit | 1bd047a359e3fe78673b95cef0d16e26cbb060f1 (patch) | |
tree | 5fdada68e5a31c20adfb0e291997daa84e3c2a5a /sd | |
parent | 431863f21b3852dec4266761b13b638d2cf7c190 (diff) |
#i118879# Prevent SlideshowImpl from being destroyed in the midle of PostYieldListener.
Notes
Notes:
prefer: 84da4113b4ec80cccd5916bf1289564837d6d5f9
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 71090c98fb11..c802bb531341 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -1907,10 +1907,20 @@ IMPL_LINK( SlideshowImpl, PostYieldListener, void*, EMPTYARG ) { 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; } |