diff options
author | Torbjörn Andersson | 2012-06-21 21:30:09 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2012-06-21 21:30:09 +0200 |
commit | 2990482406710c77280c67f3b7672a569b9d5a92 (patch) | |
tree | 5fd83f0f699ee5d0344057488f444416c9a4fe85 /engines/tony | |
parent | fdc619191b4778608263e57a815bd99b3823c11d (diff) | |
download | scummvm-rg350-2990482406710c77280c67f3b7672a569b9d5a92.tar.gz scummvm-rg350-2990482406710c77280c67f3b7672a569b9d5a92.tar.bz2 scummvm-rg350-2990482406710c77280c67f3b7672a569b9d5a92.zip |
TONY: Fix Valgrind warning
The loop uses _ctx->msg, so don't delete it until the loop is done.
Diffstat (limited to 'engines/tony')
-rw-r--r-- | engines/tony/custom.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp index 3a0792252b..35ae8849f1 100644 --- a/engines/tony/custom.cpp +++ b/engines/tony/custom.cpp @@ -1761,9 +1761,9 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes GLOBALS._curBackText = NULL; delete _ctx->text; - delete _ctx->msg; } + delete _ctx->msg; // Try to run the custom function to close the speech if (GLOBALS._mCharacter[nChar]._item) { |