[Libreoffice-commits] core.git: include/vcl vcl/source
Michael Meeks
michael.meeks at collabora.com
Wed Mar 11 06:07:13 PDT 2015
include/vcl/timer.hxx | 2 +-
vcl/source/app/timer.cxx | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 50d961ebf107bfd3e3a557c4da75bfec2a463408
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed Mar 11 13:10:34 2015 +0000
vcl timers: avoid crash initializing too early.
We need the default instance created first.
Change-Id: I95f51e9ec5d9827f2b1b53bcadb1f43c9e637edd
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index c5849a2..8ab238a 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -35,7 +35,7 @@ protected:
virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTime ) SAL_OVERRIDE;
private:
- void InitSystemTimer();
+ static void InitSystemTimer();
public:
Timer();
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 565751f..a49f4f5 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -27,6 +27,8 @@
void Timer::ImplStartTimer( ImplSVData* pSVData, sal_uInt64 nMS )
{
+ InitSystemTimer();
+
if ( !nMS )
nMS = 1;
@@ -101,7 +103,6 @@ Timer::Timer() : Scheduler()
mnTimeout = 1;
mbAuto = false;
mePriority = SchedulerPriority::HIGHEST;
- InitSystemTimer();
}
Timer::Timer( const Timer& rTimer ) : Scheduler(rTimer)
@@ -109,7 +110,6 @@ Timer::Timer( const Timer& rTimer ) : Scheduler(rTimer)
mnTimeout = rTimer.mnTimeout;
mbAuto = rTimer.mbAuto;
maTimeoutHdl = rTimer.maTimeoutHdl;
- InitSystemTimer();
}
void Timer::Invoke()
@@ -122,7 +122,6 @@ void Timer::Start()
Scheduler::Start();
ImplSVData* pSVData = ImplGetSVData();
- assert( pSVData->mpSalTimer != NULL );
if ( mnTimeout < pSVData->mnTimerPeriod )
Timer::ImplStartTimer( pSVData, mnTimeout );
}
More information about the Libreoffice-commits
mailing list