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
@@ -2027,6 +2027,10 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
{
+ //Get a shared-ptr that outlives the scope-guard which will
+ //ensure that the pointed-to-item exists in the case of a
+ //::dispose clearing mpPresTimer
+ boost::shared_ptr<canvas::tools::ElapsedTime> xTimer(mpPresTimer);
comphelper::ScopeGuard scopeGuard(
boost::bind( &canvas::tools::ElapsedTime::releaseTimer,
- boost::cref(mpPresTimer) ) );
- mpPresTimer->holdTimer();
+ boost::cref(xTimer) ) );
+ xTimer->holdTimer();