aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/mohawk/livingbooks.cpp10
-rw-r--r--engines/mohawk/livingbooks.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 9dd5c9c032..bd2891ef7a 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -2909,6 +2909,16 @@ void LBGroupItem::readData(uint16 type, uint16 size, Common::SeekableSubReadStre
}
}
+void LBGroupItem::destroySelf() {
+ LBItem::destroySelf();
+
+ for (uint i = 0; i < _groupEntries.size(); i++) {
+ LBItem *item = _vm->getItemById(_groupEntries[i].entryId);
+ if (item)
+ item->destroySelf();
+ }
+}
+
void LBGroupItem::setEnabled(bool enabled) {
if (_starting) {
_starting = false;
diff --git a/engines/mohawk/livingbooks.h b/engines/mohawk/livingbooks.h
index 6c22187cf3..3cd9142793 100644
--- a/engines/mohawk/livingbooks.h
+++ b/engines/mohawk/livingbooks.h
@@ -424,6 +424,7 @@ public:
void readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream);
+ void destroySelf();
void setEnabled(bool enabled);
void setGlobalEnabled(bool enabled);
bool contains(Common::Point point);