Skip to content

Commit

Permalink
DIRECTOR: Fix crash on deinitialization
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Aug 3, 2016
1 parent 95c1437 commit 4b9b1f3
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions engines/director/director.cpp
Expand Up @@ -53,30 +53,30 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam

// Setup mixer
syncSoundSettings();
_sharedCasts = new Common::HashMap<int, Cast *>();
_sharedDIB = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>();
_sharedBMP = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>();
_sharedSTXT = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>();
_sharedSound = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>();
_sharedCasts = new Common::HashMap<int, Cast *>;
_sharedDIB = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>;
_sharedBMP = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>;
_sharedSTXT = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>;
_sharedSound = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>;

_mainArchive = 0;
_macBinary = 0;
//FIXME
_sharedMMM = "SHARDCST.MMM";
_movies = new Common::HashMap<Common::String, Score *>();
_movies = new Common::HashMap<Common::String, Score *>;

const Common::FSNode gameDataDir(ConfMan.get("path"));
SearchMan.addSubDirectoryMatching(gameDataDir, "data");
SearchMan.addSubDirectoryMatching(gameDataDir, "install");
}

DirectorEngine::~DirectorEngine() {
delete[] _sharedCasts;
delete[] _sharedSound;
delete[] _sharedBMP;
delete[] _sharedSTXT;
delete[] _sharedDIB;
delete[] _movies;
delete _sharedCasts;
delete _sharedSound;
delete _sharedBMP;
delete _sharedSTXT;
delete _sharedDIB;
delete _movies;

delete _mainArchive;
delete _macBinary;
Expand Down

0 comments on commit 4b9b1f3

Please sign in to comment.