aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorPaul Gilbert2011-05-08 18:15:46 +1000
committerPaul Gilbert2011-05-08 18:15:46 +1000
commit0da8f92f0fbfb82eb135c0a84e970e17a2a1da47 (patch)
tree01bebcd8e6fb1d062e16bd8dbd0981ae110e2ad1 /engines/tsage
parent3b2c3907a068fa0cea366a5e1cf47a23abb170ca (diff)
downloadscummvm-rg350-0da8f92f0fbfb82eb135c0a84e970e17a2a1da47.tar.gz
scummvm-rg350-0da8f92f0fbfb82eb135c0a84e970e17a2a1da47.tar.bz2
scummvm-rg350-0da8f92f0fbfb82eb135c0a84e970e17a2a1da47.zip
TSAGE: Fix memory leak when exiting whilst any palette rotation is active
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/core.cpp4
-rw-r--r--engines/tsage/core.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 28d6dbfb19..8ad920e6fd 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1166,6 +1166,10 @@ ScenePalette::ScenePalette() {
_field412 = 0;
}
+ScenePalette::~ScenePalette() {
+ clearListeners();
+}
+
ScenePalette::ScenePalette(int paletteNum) {
loadPalette(paletteNum);
}
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index a4a0ec208a..001b478fc9 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -349,6 +349,7 @@ public:
public:
ScenePalette();
ScenePalette(int paletteNum);
+ ~ScenePalette();
bool loadPalette(int paletteNum);
void refresh();