aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus
diff options
context:
space:
mode:
authorMatthew Hoops2012-12-13 00:38:48 -0500
committerMatthew Hoops2012-12-13 00:39:49 -0500
commit8e2e3172941ae2f79f2ccdb321b7ff539bcca41e (patch)
tree93806837a33571baf5d2fb545aa1c7971e3fd504 /engines/pegasus
parent6b6e6c92c7c797560745651c1b16f1b5764bf297 (diff)
downloadscummvm-rg350-8e2e3172941ae2f79f2ccdb321b7ff539bcca41e.tar.gz
scummvm-rg350-8e2e3172941ae2f79f2ccdb321b7ff539bcca41e.tar.bz2
scummvm-rg350-8e2e3172941ae2f79f2ccdb321b7ff539bcca41e.zip
PEGASUS: Fix invalid use of RipTimer
Diffstat (limited to 'engines/pegasus')
-rw-r--r--engines/pegasus/neighborhood/tsa/fulltsa.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/pegasus/neighborhood/tsa/fulltsa.cpp b/engines/pegasus/neighborhood/tsa/fulltsa.cpp
index b598841b45..9b843da5d6 100644
--- a/engines/pegasus/neighborhood/tsa/fulltsa.cpp
+++ b/engines/pegasus/neighborhood/tsa/fulltsa.cpp
@@ -622,6 +622,13 @@ void RipTimer::draw(const Common::Rect &updateRect) {
}
void RipTimer::timeChanged(const TimeValue newTime) {
+ // WORKAROUND: If the timer isn't running, don't run the following code.
+ // Fixes use of the code when it shouldn't be running (since this is an
+ // IdlerAnimation, this is called on useIdleTime() but this specific
+ // timer only makes sense when used as an actual timer).
+ if (!isRunning())
+ return;
+
Common::Rect bounds;
getBounds(bounds);