diff options
Diffstat (limited to 'sd/source/ui/tools/TimerBasedTaskExecution.cxx')
-rw-r--r-- | sd/source/ui/tools/TimerBasedTaskExecution.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sd/source/ui/tools/TimerBasedTaskExecution.cxx b/sd/source/ui/tools/TimerBasedTaskExecution.cxx index 8d99a259a7e3..f61823b31d6a 100644 --- a/sd/source/ui/tools/TimerBasedTaskExecution.cxx +++ b/sd/source/ui/tools/TimerBasedTaskExecution.cxx @@ -48,7 +48,8 @@ std::shared_ptr<TimerBasedTaskExecution> TimerBasedTaskExecution::Create ( // Let the new object have a shared_ptr to itself, so that it can // release itself when the AsynchronousTask has been executed // completely. - pExecution->SetSelf(pExecution); + if (pExecution->mpTask.get() != nullptr) + pExecution->mpSelf = pExecution; return pExecution; } @@ -99,13 +100,6 @@ TimerBasedTaskExecution::~TimerBasedTaskExecution() maTimer.Stop(); } -void TimerBasedTaskExecution::SetSelf ( - const std::shared_ptr<TimerBasedTaskExecution>& rpSelf) -{ - if (mpTask.get() != nullptr) - mpSelf = rpSelf; -} - IMPL_LINK_NOARG(TimerBasedTaskExecution, TimerCallback, Timer *, void) { if (mpTask.get() != nullptr) |