aboutsummaryrefslogtreecommitdiff
path: root/engines/cge
diff options
context:
space:
mode:
authorPaul Gilbert2011-07-12 21:41:11 +1000
committerPaul Gilbert2011-07-12 21:41:11 +1000
commitb6be90326d31030ac364edeb8538aecaef51e378 (patch)
tree19bd8657e9d8edd1a679c1cf23537c6af77a7b68 /engines/cge
parentdaae033e0156f19b3bdbb46aa7b0785c40f1e094 (diff)
downloadscummvm-rg350-b6be90326d31030ac364edeb8538aecaef51e378.tar.gz
scummvm-rg350-b6be90326d31030ac364edeb8538aecaef51e378.tar.bz2
scummvm-rg350-b6be90326d31030ac364edeb8538aecaef51e378.zip
CGE: Fixed a memory leak with Sprite::setSeq
Diffstat (limited to 'engines/cge')
-rw-r--r--engines/cge/vga13h.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index 2cdca0004f..96642b4540 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -451,6 +451,11 @@ bool Sprite::works(Sprite *spr) {
Seq *Sprite::setSeq(Seq *seq) {
+ if (_ext) {
+ free(_ext->_seq);
+ _ext->_seq = NULL;
+ }
+
expand();
register Seq *s = _ext->_seq;
_ext->_seq = seq;