aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/coktelvideo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/coktelvideo.cpp')
-rw-r--r--engines/gob/coktelvideo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp
index c86ac48459..b7d13333b3 100644
--- a/engines/gob/coktelvideo.cpp
+++ b/engines/gob/coktelvideo.cpp
@@ -1213,7 +1213,7 @@ CoktelVideo::State Vmd::processFrame(uint16 frame) {
if (!_vidMem)
setVideoMemory();
- for (uint16 i = 0; i < _partsPerFrame; i++) {
+ for (uint16 i = 0; (i < _partsPerFrame) && (frame < _framesCount); i++) {
Part &part = _frames[frame].parts[i];
if (part.type == kPartTypeAudio) {