aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress/game
diff options
context:
space:
mode:
authorJulien Templier2010-11-16 14:06:59 +0000
committerJulien Templier2010-11-16 14:06:59 +0000
commitda90fa14055fc501e5b29209d0d817f62cb0c770 (patch)
tree9eaa4d3af917d4a34cc5dff2189d2db166f7d7b5 /engines/lastexpress/game
parentde0f878d1e785c42d044b5b0f95290f33658d147 (diff)
downloadscummvm-rg350-da90fa14055fc501e5b29209d0d817f62cb0c770.tar.gz
scummvm-rg350-da90fa14055fc501e5b29209d0d817f62cb0c770.tar.bz2
scummvm-rg350-da90fa14055fc501e5b29209d0d817f62cb0c770.zip
LASTEXPRESS: Fix SequenceFrame leak in Entities code
- Add EntityCallData destructor to dispose of frames & Sequences - Properly dispose of frames in Entities::resetSequences() svn-id: r54270
Diffstat (limited to 'engines/lastexpress/game')
-rw-r--r--engines/lastexpress/game/entities.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp
index 639470d502..e5219787c5 100644
--- a/engines/lastexpress/game/entities.cpp
+++ b/engines/lastexpress/game/entities.cpp
@@ -607,10 +607,8 @@ void Entities::resetSequences(EntityIndex entityIndex) const {
getData(entityIndex)->currentFrame = -1;
}
- // FIXME: in the original engine, the sequence pointers might just be copies,
- // make sure we free the associated memory at some point
- getData(entityIndex)->frame = NULL;
- getData(entityIndex)->frame1 = NULL;
+ SAFE_DELETE(getData(entityIndex)->frame);
+ SAFE_DELETE(getData(entityIndex)->frame1);
SAFE_DELETE(getData(entityIndex)->sequence);
SAFE_DELETE(getData(entityIndex)->sequence2);