aboutsummaryrefslogtreecommitdiff
path: root/engines/director/resource.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2020-01-10 16:52:40 +0100
committerEugene Sandulenko2020-01-10 16:52:40 +0100
commitbe69970112a045da9eefa035e2d3f38b6996685c (patch)
treefa10b63e790425a1eff80a0b1c99e7faa78d9b80 /engines/director/resource.cpp
parenta18eae10679ed12fb6a37c93cb0b391df874c7c6 (diff)
downloadscummvm-rg350-be69970112a045da9eefa035e2d3f38b6996685c.tar.gz
scummvm-rg350-be69970112a045da9eefa035e2d3f38b6996685c.tar.bz2
scummvm-rg350-be69970112a045da9eefa035e2d3f38b6996685c.zip
DIRECTOR: Fix crashes on ungraceful exit
Diffstat (limited to 'engines/director/resource.cpp')
-rw-r--r--engines/director/resource.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp
index 1123d92e7c..bd8000d68d 100644
--- a/engines/director/resource.cpp
+++ b/engines/director/resource.cpp
@@ -64,6 +64,9 @@ Archive *DirectorEngine::openMainArchive(const Common::String movie) {
_mainArchive = createArchive();
if (!_mainArchive->openFile(movie)) {
+ delete _mainArchive;
+ _mainArchive = nullptr;
+
warning("openMainArchive(): Could not open '%s'", movie.c_str());
return nullptr;
}
@@ -295,8 +298,6 @@ void DirectorEngine::loadSharedCastsFrom(Common::String filename) {
delete shardcst;
- _sharedScore = new Score(this);
-
return;
}