mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 12:09:15 +00:00
SCUMM: fix engine destructor
(This is relevant for cases where the engine errors out early, before certain arrays get initialized).
This commit is contained in:
parent
4c70d39933
commit
afb1b3d8d3
@ -162,7 +162,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
|
||||
_pauseDialog = NULL;
|
||||
_versionDialog = NULL;
|
||||
_fastMode = 0;
|
||||
_actors = NULL;
|
||||
_actors = _sortedActors = NULL;
|
||||
_arraySlot = NULL;
|
||||
_inventory = NULL;
|
||||
_newNames = NULL;
|
||||
@ -584,9 +584,12 @@ ScummEngine::~ScummEngine() {
|
||||
|
||||
_mixer->stopAll();
|
||||
|
||||
for (int i = 0; i < _numActors; ++i)
|
||||
delete _actors[i];
|
||||
delete[] _actors;
|
||||
if (_actors) {
|
||||
for (int i = 0; i < _numActors; ++i)
|
||||
delete _actors[i];
|
||||
delete[] _actors;
|
||||
}
|
||||
|
||||
delete[] _sortedActors;
|
||||
|
||||
delete[] _2byteFontPtr;
|
||||
@ -1361,6 +1364,7 @@ void ScummEngine::resetScumm() {
|
||||
#ifdef USE_RGB_COLOR
|
||||
if (_game.features & GF_16BIT_COLOR
|
||||
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
|
||||
|
||||
|| _game.platform == Common::kPlatformFMTowns
|
||||
#endif
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user