diff options
author | Julien Templier | 2010-11-11 14:19:44 +0000 |
---|---|---|
committer | Julien Templier | 2010-11-11 14:19:44 +0000 |
commit | 521f228ceddda2cfc0ed1006682d1b7dfbca7302 (patch) | |
tree | a2e217595367a0441480eff679b21edcfaa5368e /engines/lastexpress/data/animation.cpp | |
parent | 7207d920bc2f4e01a653e0fada30698c870b9e8b (diff) | |
download | scummvm-rg350-521f228ceddda2cfc0ed1006682d1b7dfbca7302.tar.gz scummvm-rg350-521f228ceddda2cfc0ed1006682d1b7dfbca7302.tar.bz2 scummvm-rg350-521f228ceddda2cfc0ed1006682d1b7dfbca7302.zip |
LASTEXPRESS: Use SAFE_DELETE for class variables
svn-id: r54201
Diffstat (limited to 'engines/lastexpress/data/animation.cpp')
-rw-r--r-- | engines/lastexpress/data/animation.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp index 88973c4b0b..3f1383022f 100644 --- a/engines/lastexpress/data/animation.cpp +++ b/engines/lastexpress/data/animation.cpp @@ -31,6 +31,7 @@ #include "lastexpress/data/snd.h" #include "lastexpress/debug.h" +#include "lastexpress/helpers.h" #include "common/events.h" #include "engines/engine.h" @@ -45,21 +46,17 @@ Animation::~Animation() { } void Animation::reset() { - delete _overlay; - _overlay = NULL; - delete _background1; - _background1 = NULL; - delete _background2; - _background2 = NULL; - delete _audio; - _audio = NULL; + SAFE_DELETE(_overlay); + SAFE_DELETE(_background1); + SAFE_DELETE(_background2); + SAFE_DELETE(_audio); _backgroundCurrent = 0; _chunks.clear(); _currentChunk = NULL; - delete _stream; + SAFE_DELETE(_stream); } bool Animation::load(Common::SeekableReadStream *stream, int flag) { |