mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 03:10:22 +00:00
DIRECTOR: Sanity checks on unsuccessful movie loading
This commit is contained in:
parent
b0d31a2afa
commit
b521eb3fd4
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user