From 66c7777dfedd4ec7a251b4a47e9b581a3e7570d4 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 10 Jul 2011 18:17:40 +1000 Subject: CGE: Fix Valgrind identified errors --- engines/cge/vga13h.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'engines') diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp index 526faed566..9498b04e8c 100644 --- a/engines/cge/vga13h.cpp +++ b/engines/cge/vga13h.cpp @@ -362,8 +362,6 @@ Sprite::Sprite(CGEEngine *vm, BMP_PTR *shpP) Sprite::~Sprite() { - if (_sprite == this) - _sprite = NULL; contract(); } @@ -405,6 +403,7 @@ BMP_PTR *Sprite::setShapeList(BMP_PTR *shpP) { } expand(); _ext->_shpList = shpP; + _flags._bDel = true; if (!_ext->_seq) setSeq((_shpCnt < 2) ? _seq1 : _seq2); } @@ -907,14 +906,8 @@ template inline bool contains(const Common::List &l, const T &v) { return (Common::find(l.begin(), l.end(), v) != l.end()); } -Common::List l; Sprite *Queue::remove(Sprite *spr) { - if (contains(l, spr)) { - debug("N"); - } - l.push_back(spr); - if (spr == _head) _head = spr->_next; if (spr == _tail) -- cgit v1.2.3