summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-11 13:10:34 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-03-11 13:11:19 +0000
commit50d961ebf107bfd3e3a557c4da75bfec2a463408 (patch)
treef6abb1a1b2c7bf1c679525eef0f2c72412f5eab1 /vcl/source/app
parent22cd725fd66f8299f23367a2eac7aaa403ed74aa (diff)
vcl timers: avoid crash initializing too early.
We need the default instance created first. Change-Id: I95f51e9ec5d9827f2b1b53bcadb1f43c9e637edd
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/timer.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 565751f0ea0d..a49f4f5ed320 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 );
}