diff options
author | Paul Gilbert | 2017-09-29 21:16:43 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-09-29 21:16:43 -0400 |
commit | 4d49c3db3ae0cce2fe7fa38c65a56c8795e629ac (patch) | |
tree | 3d67da655e8e1efd60dbe43527e71fb5e3d07241 /engines/titanic/game_state.cpp | |
parent | fa3cc0ab53d7b560959b7cb0c88d3c01f0cb85ce (diff) | |
download | scummvm-rg350-4d49c3db3ae0cce2fe7fa38c65a56c8795e629ac.tar.gz scummvm-rg350-4d49c3db3ae0cce2fe7fa38c65a56c8795e629ac.tar.bz2 scummvm-rg350-4d49c3db3ae0cce2fe7fa38c65a56c8795e629ac.zip |
TITANIC: Fix leaks in CGameState _movieList
Diffstat (limited to 'engines/titanic/game_state.cpp')
-rw-r--r-- | engines/titanic/game_state.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/titanic/game_state.cpp b/engines/titanic/game_state.cpp index 9bb83cc03a..7de069b97c 100644 --- a/engines/titanic/game_state.cpp +++ b/engines/titanic/game_state.cpp @@ -31,16 +31,16 @@ namespace Titanic { bool CGameStateMovieList::empty() { for (CGameStateMovieList::iterator i = begin(); i != end(); ) { - CMovieListItem *movieItem = *i; + CMovie *movie = *i; - if (movieItem->_item->isActive()) { + if (movie->isActive()) { ++i; } else { i = erase(i); } } - return List<CMovieListItem>::empty(); + return Common::List<CMovie *>::empty(); } /*------------------------------------------------------------------------*/ @@ -163,7 +163,7 @@ void CGameState::checkForViewChange() { } void CGameState::addMovie(CMovie *movie) { - _movieList.push_back(new CMovieListItem(movie)); + _movieList.push_back(movie); setMode(GSMODE_CUTSCENE); } |