diff options
author | Florian Kagerer | 2008-05-13 21:39:18 +0000 |
---|---|---|
committer | Florian Kagerer | 2008-05-13 21:39:18 +0000 |
commit | 231ef79de22b0ca1836c33fd8d54b7b5cb9970e3 (patch) | |
tree | f2bb0137fa2f55781b84d3aa173e8087f8543c43 /engines | |
parent | 6f14d881389099348084b19c2ed0261df6b422bf (diff) | |
download | scummvm-rg350-231ef79de22b0ca1836c33fd8d54b7b5cb9970e3.tar.gz scummvm-rg350-231ef79de22b0ca1836c33fd8d54b7b5cb9970e3.tar.bz2 scummvm-rg350-231ef79de22b0ca1836c33fd8d54b7b5cb9970e3.zip |
fix engine destructor for non interactive hof demo
svn-id: r32093
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/kyra_v2.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index b2c44981ec..7b720259cc 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -71,11 +71,13 @@ KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const Engi } KyraEngine_v2::~KyraEngine_v2() { - for (ShapeMap::iterator i = _gameShapes.begin(); i != _gameShapes.end(); ++i) { - delete[] i->_value; - i->_value = 0; + if (!(_flags.isDemo && !_flags.isTalkie)) { + for (ShapeMap::iterator i = _gameShapes.begin(); i != _gameShapes.end(); ++i) { + delete[] i->_value; + i->_value = 0; + } + _gameShapes.clear(); } - _gameShapes.clear(); delete[] _itemList; delete[] _sceneList; |