diff options
-rw-r--r-- | engines/director/resource.cpp | 6 | ||||
-rw-r--r-- | engines/director/score.cpp | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp index 2f4f589d72..1123d92e7c 100644 --- a/engines/director/resource.cpp +++ b/engines/director/resource.cpp @@ -63,8 +63,10 @@ Archive *DirectorEngine::openMainArchive(const Common::String movie) { _mainArchive = createArchive(); - if (!_mainArchive->openFile(movie)) - error("openMainArchive(): Could not open '%s'", movie.c_str()); + if (!_mainArchive->openFile(movie)) { + warning("openMainArchive(): Could not open '%s'", movie.c_str()); + return nullptr; + } return _mainArchive; } diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 67eb27b74e..ead93429e0 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -358,13 +358,13 @@ void Score::loadSpriteImages(bool isSharedCast) { Score::~Score() { - if (_surface) + if (_surface && _surface->w) _surface->free(); - if (_trailSurface) + if (_trailSurface && _trailSurface->w) _trailSurface->free(); - if (_backSurface) + if (_backSurface && _backSurface->w) _backSurface->free(); delete _backSurface; |