aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2020-01-09 18:07:23 +0100
committerEugene Sandulenko2020-01-09 18:07:23 +0100
commit0869e02c1be101ef582b3b79ded8ebab4f4dbb7c (patch)
tree189cc83ce9767af01d626ecd59656e91aa4b65d6 /engines/director
parent625f3c1c28a42e407bccb2228053be8717dbdc48 (diff)
downloadscummvm-rg350-0869e02c1be101ef582b3b79ded8ebab4f4dbb7c.tar.gz
scummvm-rg350-0869e02c1be101ef582b3b79ded8ebab4f4dbb7c.tar.bz2
scummvm-rg350-0869e02c1be101ef582b3b79ded8ebab4f4dbb7c.zip
DIRECTOR: Properly reastart movies
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/resource.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp
index 4d5f9a9cd4..f422808b13 100644
--- a/engines/director/resource.cpp
+++ b/engines/director/resource.cpp
@@ -256,14 +256,21 @@ void DirectorEngine::clearSharedCast() {
delete _sharedScore;
+ _sharedScore = nullptr;
+
delete _sharedDIB;
delete _sharedSTXT;
delete _sharedSound;
delete _sharedBMP;
+
+ _sharedDIB = nullptr;
+ _sharedSTXT = nullptr;
+ _sharedSound = nullptr;
+ _sharedBMP = nullptr;
}
void DirectorEngine::loadSharedCastsFrom(Common::String filename) {
- if (_sharedScore) {
+ if (_sharedScore && _sharedScore->_movieArchive) {
if (_sharedScore->_movieArchive->getFileName().equalsIgnoreCase(filename))
return;
}
@@ -284,6 +291,8 @@ void DirectorEngine::loadSharedCastsFrom(Common::String filename) {
if (!shardcst->openFile(filename)) {
warning("No shared cast %s", filename.c_str());
+ delete shardcst;
+
_sharedScore = new Score(this);
return;