diff options
Diffstat (limited to 'engines/draci/animation.cpp')
-rw-r--r-- | engines/draci/animation.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/draci/animation.cpp b/engines/draci/animation.cpp index c074deb867..94c12d1c51 100644 --- a/engines/draci/animation.cpp +++ b/engines/draci/animation.cpp @@ -98,11 +98,23 @@ void Animation::deleteAnimation(uint id) { Common::List<AnimObj>::iterator it = getAnimation(id); + for(uint i = 0; i < it->_frames.size(); ++i) { + delete it->_frames[i]; + } + _animObjects.erase(it); } void Animation::deleteAll() { + Common::List<AnimObj>::iterator it; + + for (it = _animObjects.begin(); it != _animObjects.end(); ++it) { + for(uint i = 0; i < it->_frames.size(); ++i) { + delete it->_frames[i]; + } + } + _animObjects.clear(); } |