aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/custom.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2012-06-21 21:30:09 +0200
committerTorbjörn Andersson2012-06-21 21:30:09 +0200
commit2990482406710c77280c67f3b7672a569b9d5a92 (patch)
tree5fd83f0f699ee5d0344057488f444416c9a4fe85 /engines/tony/custom.cpp
parentfdc619191b4778608263e57a815bd99b3823c11d (diff)
downloadscummvm-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/custom.cpp')
-rw-r--r--engines/tony/custom.cpp2
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) {