diff options
author | Paul Gilbert | 2015-03-08 23:40:50 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-03-08 23:40:50 -0400 |
commit | cc0b88cc532d7708e13a6a9e22da2595223b8e49 (patch) | |
tree | 7d7a52c2fbba5f1994d766561909796e25549b84 | |
parent | aad048674b3d63c05742ce9091416ad5465cb541 (diff) | |
download | scummvm-rg350-cc0b88cc532d7708e13a6a9e22da2595223b8e49.tar.gz scummvm-rg350-cc0b88cc532d7708e13a6a9e22da2595223b8e49.tar.bz2 scummvm-rg350-cc0b88cc532d7708e13a6a9e22da2595223b8e49.zip |
MADS: Fix leak of SpriteAsset instances
-rw-r--r-- | engines/mads/sprites.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp index aa73fce712..19742e22b0 100644 --- a/engines/mads/sprites.cpp +++ b/engines/mads/sprites.cpp @@ -402,6 +402,7 @@ void SpriteSets::remove(int idx) { (*this)[idx] = nullptr; } else { do { + delete (*this)[size() - 1]; remove_at(size() - 1); } while (size() > 0 && (*this)[size() - 1] == nullptr); } |