aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/res_struct.h
diff options
context:
space:
mode:
authorPaul Gilbert2010-11-14 00:35:13 +0000
committerPaul Gilbert2010-11-14 00:35:13 +0000
commitdb24b2a01415627ac540bf96e54902de2956b12b (patch)
treea6204ae9f3b86f693d50ab713df10c598b26a708 /engines/lure/res_struct.h
parent4e357549d57c1d820e320461450d52e36d10f477 (diff)
downloadscummvm-rg350-db24b2a01415627ac540bf96e54902de2956b12b.tar.gz
scummvm-rg350-db24b2a01415627ac540bf96e54902de2956b12b.tar.bz2
scummvm-rg350-db24b2a01415627ac540bf96e54902de2956b12b.zip
LURE: Fix for Valgrind identified memory leaks
svn-id: r54236
Diffstat (limited to 'engines/lure/res_struct.h')
-rw-r--r--engines/lure/res_struct.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/lure/res_struct.h b/engines/lure/res_struct.h
index 9b2a4c79f8..e4b8c02f6a 100644
--- a/engines/lure/res_struct.h
+++ b/engines/lure/res_struct.h
@@ -445,6 +445,10 @@ public:
void setRoomNumber(uint16 roomNum) { _roomNumber = roomNum; }
void setSupportData(CharacterScheduleEntry *newRec) {
assert((newRec == NULL) || (newRec->parent() != NULL));
+ if (_dynamicSupportData) {
+ delete _supportData;
+ _dynamicSupportData = false;
+ }
_supportData = newRec;
}
void setSupportData(uint16 entryId);