aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFlorian Kagerer2008-05-13 21:39:18 +0000
committerFlorian Kagerer2008-05-13 21:39:18 +0000
commit231ef79de22b0ca1836c33fd8d54b7b5cb9970e3 (patch)
treef2bb0137fa2f55781b84d3aa173e8087f8543c43 /engines
parent6f14d881389099348084b19c2ed0261df6b422bf (diff)
downloadscummvm-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.cpp10
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;