aboutsummaryrefslogtreecommitdiff
path: root/engines/director/score.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2020-01-09 18:15:23 +0100
committerEugene Sandulenko2020-01-09 18:15:23 +0100
commitb521eb3fd43c77f04e7de59450d132afd881d6fa (patch)
treed7ed9f9a0118a390e616981d42993b4a0f3a949f /engines/director/score.cpp
parentb0d31a2afa00c8af9cd42891b82d897c95c1afc3 (diff)
downloadscummvm-rg350-b521eb3fd43c77f04e7de59450d132afd881d6fa.tar.gz
scummvm-rg350-b521eb3fd43c77f04e7de59450d132afd881d6fa.tar.bz2
scummvm-rg350-b521eb3fd43c77f04e7de59450d132afd881d6fa.zip
DIRECTOR: Sanity checks on unsuccessful movie loading
Diffstat (limited to 'engines/director/score.cpp')
-rw-r--r--engines/director/score.cpp6
1 files changed, 3 insertions, 3 deletions
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;