mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 21:21:05 +00:00
TONY: Fix memory leak when game exited whilst credits are active
This commit is contained in:
parent
ea8c4960c7
commit
a850eabf07
@ -2315,6 +2315,12 @@ DECLARE_CUSTOM_FUNCTION(DoCredits)(CORO_PARAM, uint32 nMsg, uint32 dwTime, uint3
|
|||||||
uint32 hDisable;
|
uint32 hDisable;
|
||||||
int i;
|
int i;
|
||||||
uint32 startTime;
|
uint32 startTime;
|
||||||
|
|
||||||
|
~CoroContextTag() {
|
||||||
|
delete msg;
|
||||||
|
delete[] text;
|
||||||
|
}
|
||||||
|
|
||||||
CORO_END_CONTEXT(_ctx);
|
CORO_END_CONTEXT(_ctx);
|
||||||
|
|
||||||
CORO_BEGIN_CODE(_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->text;
|
||||||
delete _ctx->msg;
|
delete _ctx->msg;
|
||||||
|
_ctx->text = NULL;
|
||||||
|
_ctx->msg = NULL;
|
||||||
|
|
||||||
CORO_END_CODE;
|
CORO_END_CODE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user