aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/scumm.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 36caff452d..dd26e23b4d 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -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
)