aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/custom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tony/custom.cpp')
-rw-r--r--engines/tony/custom.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp
index 03c6405d2e..96b78d0e83 100644
--- a/engines/tony/custom.cpp
+++ b/engines/tony/custom.cpp
@@ -2315,6 +2315,12 @@ DECLARE_CUSTOM_FUNCTION(DoCredits)(CORO_PARAM, uint32 nMsg, uint32 dwTime, uint3
uint32 hDisable;
int i;
uint32 startTime;
+
+ ~CoroContextTag() {
+ delete msg;
+ delete[] text;
+ }
+
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
@@ -2368,6 +2374,8 @@ DECLARE_CUSTOM_FUNCTION(DoCredits)(CORO_PARAM, uint32 nMsg, uint32 dwTime, uint3
delete[] _ctx->text;
delete _ctx->msg;
+ _ctx->text = NULL;
+ _ctx->msg = NULL;
CORO_END_CODE;
}