mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-01 06:14:07 +00:00
TONY: Properly free dialog commands during loading when there is duplicates
This commit is contained in:
parent
5e062ce86c
commit
8d6f50463e
@ -238,6 +238,16 @@ static const byte *parseDialog(const byte *lpBuf, LPMPALDIALOG lpmdDialog) {
|
||||
for (kk = 0;kk < curCmd; kk++) {
|
||||
if (compareCommands(&lpmdDialog->_command[kk], &lpmdDialog->_command[curCmd])) {
|
||||
lpmdDialog->_group[i].CmdNum[j] = kk;
|
||||
|
||||
// Free any data allocated for the duplictaed command
|
||||
if (lpmdDialog->_command[curCmd].type == 2) {
|
||||
globalDestroy(lpmdDialog->_command[curCmd].lpszVarName);
|
||||
freeExpression(lpmdDialog->_command[curCmd].expr);
|
||||
|
||||
lpmdDialog->_command[curCmd].lpszVarName = NULL;
|
||||
lpmdDialog->_command[curCmd].expr = 0;
|
||||
lpmdDialog->_command[curCmd].type = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user