aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2011-08-06 17:22:04 +1000
committerPaul Gilbert2011-08-06 17:22:04 +1000
commit1f6c27480d67593cdd786ef25762eee249f74d36 (patch)
treefee09cda1cc9b4ee9f409e6246ca231e4702c845
parent9f8eb5a74086881f2818256b01fb6fb946c6420a (diff)
downloadscummvm-rg350-1f6c27480d67593cdd786ef25762eee249f74d36.tar.gz
scummvm-rg350-1f6c27480d67593cdd786ef25762eee249f74d36.tar.bz2
scummvm-rg350-1f6c27480d67593cdd786ef25762eee249f74d36.zip
CGE: Fix memory leak with _sprite global sprite
-rw-r--r--engines/cge/cge.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index 2baf1cde1e..c06e65491d 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -131,6 +131,7 @@ void CGEEngine::setup() {
_pocket[i]->_flags._kill = false;
}
_sprite = new Sprite(this, NULL);
+ _sprite->_flags._kill = false;
_horzLine = new HorizLine(this);
_infoLine = new InfoLine(this, kInfoW);
_cavLight = new CavLight(this);
@@ -190,7 +191,7 @@ CGEEngine::~CGEEngine() {
// Delete engine objects
delete _vga;
delete _sys;
- //delete _sprite; Sprite is destroyed by the queue it's added to
+ delete _sprite;
delete _miniCave;
delete _shadow;
delete _horzLine;