src/ai/ai.cpp
branchnoai
changeset 10649 9034b80fdbdb
parent 10643 970417eef395
child 10650 30fc5395b1b8
--- a/src/ai/ai.cpp	Mon May 19 22:28:27 2008 +0000
+++ b/src/ai/ai.cpp	Tue May 20 13:09:34 2008 +0000
@@ -29,7 +29,7 @@
 
 static AIController *_ai_player[MAX_PLAYERS];
 static AIInfo *_ai_info[MAX_PLAYERS];
-static AISquirrel *_ai_squirrel;
+static AISquirrel *_ai_squirrel = NULL;
 static uint _ai_frame_counter;
 static bool _ai_enabled;
 static char *_forced_ai_name = NULL;
@@ -143,6 +143,7 @@
 	_ai_enabled = true;
 
 	/* Create the Squirrel collector, which scans for all AIs available */
+	assert(_ai_squirrel == NULL);
 	_ai_squirrel = new AISquirrel();
 }
 
@@ -179,6 +180,7 @@
 	}
 
 	delete _ai_squirrel;
+	_ai_squirrel = NULL;
 }
 
 /**