aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/lol.cpp
diff options
context:
space:
mode:
authorFlorian Kagerer2009-05-31 01:24:08 +0000
committerFlorian Kagerer2009-05-31 01:24:08 +0000
commitc938667d4b60005a926007376305f3da8621f7c7 (patch)
treea6c2bd7655a64319269e8be65d90c5c0aa2f13d7 /engines/kyra/lol.cpp
parentabe8cf06255f7398127912354dfbf84daceff569 (diff)
downloadscummvm-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.cpp21
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;