aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/ai-cinematic.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2019-06-29 22:49:59 +0200
committerEugene Sandulenko2019-09-03 17:17:05 +0200
commit7529d3e2b73e7183fcc5964de5b059f82b87ea62 (patch)
tree6917cc7ccd6f4375c2c7f7a6b19fcf9e0649a3b5 /engines/hdb/ai-cinematic.cpp
parent842377456201c42d4f6d269b046cde7ede3f2c5c (diff)
downloadscummvm-rg350-7529d3e2b73e7183fcc5964de5b059f82b87ea62.tar.gz
scummvm-rg350-7529d3e2b73e7183fcc5964de5b059f82b87ea62.tar.bz2
scummvm-rg350-7529d3e2b73e7183fcc5964de5b059f82b87ea62.zip
HDB: Fix crash when skipping cinematic
Diffstat (limited to 'engines/hdb/ai-cinematic.cpp')
-rw-r--r--engines/hdb/ai-cinematic.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp
index a8b9eafdf0..915605b0cb 100644
--- a/engines/hdb/ai-cinematic.cpp
+++ b/engines/hdb/ai-cinematic.cpp
@@ -400,11 +400,9 @@ void AI::cineCleanup() {
}
void AI::cineAbort() {
- for (Common::Array<CineCommand *>::iterator it = _cine.begin(); it != _cine.end(); it++) {
- if ((*it)->cmdType == C_STARTMAP || (*it)->cmdType == C_STOPCINE)
- _cine[0] = *it;
- if (it != _cine.begin())
- _cine.erase(it);
+ for (uint i = 0; i < _cine.size(); i++) {
+ if (_cine[i]->cmdType == C_STARTMAP || _cine[i]->cmdType == C_STOPCINE)
+ _cine[0] = _cine[i];
}
warning("STUB: Window: closeAll() required");
if (_player)