diff options
author | Eugene Sandulenko | 2016-07-02 20:52:38 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 4b9b1f3c2dfdba8e6705195832c69b2952d47f9c (patch) | |
tree | e1a3b13fac46d8d9a40294560819c7038c35e659 /engines | |
parent | 95c14371e7deedd171619e58411437d3df80f693 (diff) | |
download | scummvm-rg350-4b9b1f3c2dfdba8e6705195832c69b2952d47f9c.tar.gz scummvm-rg350-4b9b1f3c2dfdba8e6705195832c69b2952d47f9c.tar.bz2 scummvm-rg350-4b9b1f3c2dfdba8e6705195832c69b2952d47f9c.zip |
DIRECTOR: Fix crash on deinitialization
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/director.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index 71cd3b686a..db218e449a 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -53,17 +53,17 @@ 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"); @@ -71,12 +71,12 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam } 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; |