Mercurial > hg > openttd
diff src/ai/ai_instance.cpp @ 10799:c8323cf9bb9d draft
(svn r15133) -Fix: Crash if no NoAIs are present.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Sat, 17 Jan 2009 22:22:53 +0000 |
parents | e0371993d4fd |
children | 4b0aae0b22a8 |
line wrap: on
line diff
--- a/src/ai/ai_instance.cpp +++ b/src/ai/ai_instance.cpp @@ -247,7 +247,7 @@ DEBUG(ai, 0, "The AI died unexpectedly."); this->is_dead = true; - this->engine->ReleaseObject(this->instance); + if (this->instance != NULL) this->engine->ReleaseObject(this->instance); delete this->engine; this->instance = NULL; this->engine = NULL;