aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/location.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/parallaction/location.cpp')
-rw-r--r--engines/parallaction/location.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/parallaction/location.cpp b/engines/parallaction/location.cpp
index da67c556af..012e351ab5 100644
--- a/engines/parallaction/location.cpp
+++ b/engines/parallaction/location.cpp
@@ -179,9 +179,14 @@ void Parallaction::freeLocation() {
if (_localFlagNames)
delete _localFlagNames;
- _localFlagNames = new Table(120);
- _localFlagNames->addData("visited");
-
+
+ // HACK: prevents leakage. A routine like this
+ // should allocate memory at all, though.
+ if ((_engineFlags & kEngineQuit) == 0) {
+ _localFlagNames = new Table(120);
+ _localFlagNames->addData("visited");
+ }
+
_location._walkNodes.clear();
// TODO (LIST): helperNode should be rendered useless by the use of a Common::List<>