diff options
author | Paul Gilbert | 2016-11-15 21:04:30 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-11-15 21:04:30 -0500 |
commit | afb4b6227a0f20ca829801e00dcf75eeb4c18999 (patch) | |
tree | bcff5fd2dd3d955f7dc4e1759f299b3c1c62d9d3 /engines/titanic/support | |
parent | 5971e0302f331dd05cdedc7ab4a9762cb947b02f (diff) | |
download | scummvm-rg350-afb4b6227a0f20ca829801e00dcf75eeb4c18999.tar.gz scummvm-rg350-afb4b6227a0f20ca829801e00dcf75eeb4c18999.tar.bz2 scummvm-rg350-afb4b6227a0f20ca829801e00dcf75eeb4c18999.zip |
TITANIC: Fixes for freeing project and engine objects on exit
Diffstat (limited to 'engines/titanic/support')
-rw-r--r-- | engines/titanic/support/movie.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/engines/titanic/support/movie.cpp b/engines/titanic/support/movie.cpp index 1bdcdee6da..c26e4eb3c4 100644 --- a/engines/titanic/support/movie.cpp +++ b/engines/titanic/support/movie.cpp @@ -50,15 +50,9 @@ void CMovie::init() { } void CMovie::deinit() { - // Delete each movie in turn - for (CMovieList::iterator i = _playingMovies->begin(); i != _playingMovies->end(); ) { - // We need to increment iterator before deleting movie, - // since the CMovie destructor calls removeFromPlayingMovies - CMovie *movie = *i; - ++i; - delete movie; - } - + // At this point, there shouldn't be any playing movies left, + // since their owning objects should have freed them + assert(_playingMovies->empty()); delete _playingMovies; delete _movieSurface; } |