aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2008-06-01 15:15:12 +0000
committerJohannes Schickel2008-06-01 15:15:12 +0000
commit85a3f389ae6020fb93786e42b5919195b800a5e9 (patch)
tree763b2deabf217c327293f0d6980829b90defaa5c /engines/kyra
parent0485fbfc5be33b7219dd117fd4a14d77393e9bb2 (diff)
downloadscummvm-rg350-85a3f389ae6020fb93786e42b5919195b800a5e9.tar.gz
scummvm-rg350-85a3f389ae6020fb93786e42b5919195b800a5e9.tar.bz2
scummvm-rg350-85a3f389ae6020fb93786e42b5919195b800a5e9.zip
Some paranoia checks in TIMInterpreter::refreshTimersAfterPause.
svn-id: r32468
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/script_tim.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index 812e867c53..96d6927f5d 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -186,8 +186,10 @@ void TIMInterpreter::exec(TIM *tim, bool loop) {
void TIMInterpreter::refreshTimersAfterPause(uint32 elapsedTime) {
for (int i = 0; i < 10; i++) {
- _currentTim->func[i].lastTime += elapsedTime;
- _currentTim->func[i].nextTime += elapsedTime;
+ if (_currentTim->func[i].lastTime)
+ _currentTim->func[i].lastTime += elapsedTime;
+ if (_currentTim->func[i].nextTime)
+ _currentTim->func[i].nextTime += elapsedTime;
}
}