aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/support/movie.cpp4
-rw-r--r--engines/titanic/support/movie.h2
-rw-r--r--engines/titanic/titanic.cpp1
3 files changed, 6 insertions, 1 deletions
diff --git a/engines/titanic/support/movie.cpp b/engines/titanic/support/movie.cpp
index f2c5643f78..79e0a7bc9f 100644
--- a/engines/titanic/support/movie.cpp
+++ b/engines/titanic/support/movie.cpp
@@ -30,6 +30,10 @@ namespace Titanic {
CMovie::CMovie() : ListItem(), _state(MOVIE_STOPPED), _field10(0) {
}
+CMovie::~CMovie() {
+ g_vm->_activeMovies.remove(this);
+}
+
bool CMovie::isActive() const {
return g_vm->_activeMovies.contains(this);
}
diff --git a/engines/titanic/support/movie.h b/engines/titanic/support/movie.h
index 0772635908..08d2940fe4 100644
--- a/engines/titanic/support/movie.h
+++ b/engines/titanic/support/movie.h
@@ -47,7 +47,7 @@ protected:
int _field10;
public:
CMovie();
- virtual ~CMovie() {}
+ virtual ~CMovie();
virtual void proc8(int v1, CVideoSurface *surface) = 0;
virtual void proc9(int v1, int v2, int v3, bool v4) = 0;
diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp
index 03d50f6153..8e079d5a60 100644
--- a/engines/titanic/titanic.cpp
+++ b/engines/titanic/titanic.cpp
@@ -62,6 +62,7 @@ TitanicEngine::~TitanicEngine() {
delete _window;
delete _screenManager;
CSaveableObject::freeClassList();
+ _activeMovies.clear();
}
void TitanicEngine::initializePath(const Common::FSNode &gamePath) {