diff options
author | Paul Gilbert | 2014-04-18 09:16:47 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-04-18 09:16:47 -0400 |
commit | cce0a4a3cf2f3380c25109f055e8b0d87b4c8b32 (patch) | |
tree | 87b72241a407bea0af7acb92a107354175f12837 /engines | |
parent | 3813eddf023e25692d92402ddcbdbe491359c698 (diff) | |
download | scummvm-rg350-cce0a4a3cf2f3380c25109f055e8b0d87b4c8b32.tar.gz scummvm-rg350-cce0a4a3cf2f3380c25109f055e8b0d87b4c8b32.tar.bz2 scummvm-rg350-cce0a4a3cf2f3380c25109f055e8b0d87b4c8b32.zip |
MADS: Fix some memory leaks in SpriteAsset class
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/assets.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/mads/assets.cpp b/engines/mads/assets.cpp index bb6f5bd1eb..46a6d3c916 100644 --- a/engines/mads/assets.cpp +++ b/engines/mads/assets.cpp @@ -49,6 +49,11 @@ SpriteAsset::SpriteAsset(MADSEngine *vm, Common::SeekableReadStream *stream, int SpriteAsset::~SpriteAsset() { if (_usageIndex) _vm->_palette->_paletteUsage.resetPalFlags(_usageIndex); + + for (uint i = 0; i < _frames.size(); ++i) + delete _frames[i]._frame; + + delete _charInfo; } void SpriteAsset::load(Common::SeekableReadStream *stream, int flags) { |