diff options
author | Eugene Sandulenko | 2019-06-29 22:49:59 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:05 +0200 |
commit | 7529d3e2b73e7183fcc5964de5b059f82b87ea62 (patch) | |
tree | 6917cc7ccd6f4375c2c7f7a6b19fcf9e0649a3b5 | |
parent | 842377456201c42d4f6d269b046cde7ede3f2c5c (diff) | |
download | scummvm-rg350-7529d3e2b73e7183fcc5964de5b059f82b87ea62.tar.gz scummvm-rg350-7529d3e2b73e7183fcc5964de5b059f82b87ea62.tar.bz2 scummvm-rg350-7529d3e2b73e7183fcc5964de5b059f82b87ea62.zip |
HDB: Fix crash when skipping cinematic
-rw-r--r-- | engines/hdb/ai-cinematic.cpp | 8 |
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) |