diff options
author | Florian Kagerer | 2009-05-31 01:24:08 +0000 |
---|---|---|
committer | Florian Kagerer | 2009-05-31 01:24:08 +0000 |
commit | c938667d4b60005a926007376305f3da8621f7c7 (patch) | |
tree | a6c2bd7655a64319269e8be65d90c5c0aa2f13d7 /engines/kyra/lol.cpp | |
parent | abe8cf06255f7398127912354dfbf84daceff569 (diff) | |
download | scummvm-rg350-c938667d4b60005a926007376305f3da8621f7c7.tar.gz scummvm-rg350-c938667d4b60005a926007376305f3da8621f7c7.tar.bz2 scummvm-rg350-c938667d4b60005a926007376305f3da8621f7c7.zip |
LOL: - fix shape memory allocation/release issue
svn-id: r41055
Diffstat (limited to 'engines/kyra/lol.cpp')
-rw-r--r-- | engines/kyra/lol.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 45ab0202eb..c0fe0f3f69 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -314,21 +314,12 @@ LoLEngine::~LoLEngine() { delete[] _healiShapes; } - if (_monsterShapes) { - for (int i = 0; i < 48; i++) - delete[] _monsterShapes[i]; - delete[] _monsterShapes; - } - if (_monsterPalettes) { - for (int i = 0; i < 48; i++) - delete[] _monsterPalettes[i]; - delete[] _monsterPalettes; - } - if (_monsterShapesEx) { - for (int i = 0; i < 576; i++) - delete[] _monsterShapesEx[i]; - delete[] _monsterShapesEx; - } + for (int i = 0; i < 3; i++) + releaseMonsterShapes(i); + + delete[] _monsterShapes; + delete[] _monsterPalettes; + delete[] _monsterShapesEx; if (_automapShapes) delete[] _automapShapes; |