aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-30 13:49:30 +0200
committerEugene Sandulenko2016-05-30 19:32:49 +0200
commitc8f28986e59b9f7bacd46f4928a3575df8bbd40d (patch)
tree6f5668f6895c661daa81a7a82b900b3d83b80b26 /engines
parentf151845e68b3c3a5246da0c7b1e954e43d74f80a (diff)
downloadscummvm-rg350-c8f28986e59b9f7bacd46f4928a3575df8bbd40d.tar.gz
scummvm-rg350-c8f28986e59b9f7bacd46f4928a3575df8bbd40d.tar.bz2
scummvm-rg350-c8f28986e59b9f7bacd46f4928a3575df8bbd40d.zip
SCUMM HE: Fix object destruction
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/moonbase/ai_main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/scumm/he/moonbase/ai_main.cpp b/engines/scumm/he/moonbase/ai_main.cpp
index 9c9ff8bb01..fa13b33d3d 100644
--- a/engines/scumm/he/moonbase/ai_main.cpp
+++ b/engines/scumm/he/moonbase/ai_main.cpp
@@ -606,7 +606,7 @@ int AI::masterControlProgram(const int paramCount, const int32 *params) {
targetX = getHubX(closestHub);
targetY = getHubY(closestHub);
- delete launchAction;
+ delete[] launchAction;
launchAction = NULL;
_aiState = STATE_DEFEND_TARGET;
delete myTree;
@@ -647,7 +647,7 @@ int AI::masterControlProgram(const int paramCount, const int32 *params) {
}
} else {
index++;
- delete launchAction;
+ delete[] launchAction;
launchAction = NULL;
}
} else {
@@ -667,7 +667,7 @@ int AI::masterControlProgram(const int paramCount, const int32 *params) {
_aiState = STATE_INIT_ACQUIRE_TARGET;
} else {
index++;
- delete launchAction;
+ delete[] launchAction;
launchAction = NULL;
}
}
@@ -695,7 +695,7 @@ int AI::masterControlProgram(const int paramCount, const int32 *params) {
}
} else {
index++;
- delete launchAction;
+ delete[] launchAction;
launchAction = NULL;
}
}