Skip to content

Commit

Permalink
SCUMM HE: Fix object destruction
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed May 30, 2016
1 parent f151845 commit c8f2898
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions engines/scumm/he/moonbase/ai_main.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -647,7 +647,7 @@ int AI::masterControlProgram(const int paramCount, const int32 *params) {
}
} else {
index++;
delete launchAction;
delete[] launchAction;
launchAction = NULL;
}
} else {
Expand All @@ -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;
}
}
Expand Down Expand Up @@ -695,7 +695,7 @@ int AI::masterControlProgram(const int paramCount, const int32 *params) {
}
} else {
index++;
delete launchAction;
delete[] launchAction;
launchAction = NULL;
}
}
Expand Down

0 comments on commit c8f2898

Please sign in to comment.