aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/lure/menu.cpp2
-rw-r--r--engines/lure/res_struct.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/engines/lure/menu.cpp b/engines/lure/menu.cpp
index 58364d4cb1..76b1d78823 100644
--- a/engines/lure/menu.cpp
+++ b/engines/lure/menu.cpp
@@ -629,6 +629,8 @@ uint16 PopupMenu::Show(int numEntries, const char *actions[]) {
}
bail_out:
+ delete s;
+
#ifndef LURE_CLICKABLE_MENUS
mouse.setPosition(oldX, oldY);
mouse.cursorOn();
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);