summaryrefslogtreecommitdiff
path: root/ai
diff options
context:
space:
mode:
Diffstat (limited to 'ai')
-rw-r--r--ai/ai.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ai/ai.c b/ai/ai.c
index 42465914d..516a86cc6 100644
--- a/ai/ai.c
+++ b/ai/ai.c
@@ -250,6 +250,8 @@ void AI_LoadAIControl(void)
*/
void AI_StartNewAI(PlayerID player)
{
+ assert(player < MAX_PLAYERS);
+
#ifdef GPMI
/* Keep this in a different IF, because the function can turn _ai.gpmi off!! */
if (_ai.gpmi && _ai.gpmi_mod == NULL)