diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/pink/objects/actions/action_play.cpp | 1 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_still.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/engines/pink/objects/actions/action_play.cpp b/engines/pink/objects/actions/action_play.cpp index 9e9c856da4..9af1900e32 100644 --- a/engines/pink/objects/actions/action_play.cpp +++ b/engines/pink/objects/actions/action_play.cpp @@ -58,6 +58,7 @@ void ActionPlay::pause(bool paused) { void ActionPlay::onStart() { debug("Actor %s has now ActionPlay %s", _actor->getName().c_str(), _name.c_str()); _decoder->start(); + assert(_startFrame <= _decoder->getFrameCount()); for (uint i = 0; i < _startFrame; ++i) { _decoder->skipFrame(); } diff --git a/engines/pink/objects/actions/action_still.cpp b/engines/pink/objects/actions/action_still.cpp index 693d1304d4..78f0949591 100644 --- a/engines/pink/objects/actions/action_still.cpp +++ b/engines/pink/objects/actions/action_still.cpp @@ -48,6 +48,8 @@ void ActionStill::pause(bool paused) {} void ActionStill::onStart() { debug("Actor %s has now ActionStill %s", _actor->getName().c_str(), _name.c_str()); + if (_startFrame >= _decoder->getFrameCount()) + _startFrame = 0; for (uint i = 0; i < _startFrame; ++i) { _decoder->skipFrame(); } |