From 231ef79de22b0ca1836c33fd8d54b7b5cb9970e3 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Tue, 13 May 2008 21:39:18 +0000 Subject: fix engine destructor for non interactive hof demo svn-id: r32093 --- engines/kyra/kyra_v2.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'engines') 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; -- cgit v1.2.3