From 8e2e3172941ae2f79f2ccdb321b7ff539bcca41e Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 13 Dec 2012 00:38:48 -0500 Subject: PEGASUS: Fix invalid use of RipTimer --- engines/pegasus/neighborhood/tsa/fulltsa.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engines/pegasus') 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); -- cgit v1.2.3