diff options
author | Julien Templier | 2010-11-16 14:06:59 +0000 |
---|---|---|
committer | Julien Templier | 2010-11-16 14:06:59 +0000 |
commit | da90fa14055fc501e5b29209d0d817f62cb0c770 (patch) | |
tree | 9eaa4d3af917d4a34cc5dff2189d2db166f7d7b5 /engines/lastexpress/game | |
parent | de0f878d1e785c42d044b5b0f95290f33658d147 (diff) | |
download | scummvm-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.cpp | 6 |
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); |