summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-12-06 16:26:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-12-06 16:26:05 +0000
commitd57887eaad534ca51fc4975918fab66b2f93633d (patch)
tree1c7d2755c0336306800e7ac7c08a4653caf71b97
parent392f0990e4b7ef7338aa901735c7a6cc7632dd40 (diff)
Resolves: rhbz#759647 ::dispose clears mpPresTimer before releaseTimer called
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 5be3b6246743..4277280df36f 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -2025,10 +2025,14 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
2025 // that have zero delay. While the timer is stopped these events 2025 // that have zero delay. While the timer is stopped these events
2026 // are processed in the same run. 2026 // are processed in the same run.
2027 { 2027 {
2028 //Get a shared-ptr that outlives the scope-guard which will
2029 //ensure that the pointed-to-item exists in the case of a
2030 //::dispose clearing mpPresTimer
2031 boost::shared_ptr<canvas::tools::ElapsedTime> xTimer(mpPresTimer);
2028 comphelper::ScopeGuard scopeGuard( 2032 comphelper::ScopeGuard scopeGuard(
2029 boost::bind( &canvas::tools::ElapsedTime::releaseTimer, 2033 boost::bind( &canvas::tools::ElapsedTime::releaseTimer,
2030 boost::cref(mpPresTimer) ) ); 2034 boost::cref(xTimer) ) );
2031 mpPresTimer->holdTimer(); 2035 xTimer->holdTimer();
2032 2036
2033 // process queues 2037 // process queues
2034 maEventQueue.process(); 2038 maEventQueue.process();