Mercurial > hg > openttd
changeset 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 | 9757d7251204 |
children | eb2b5e1ca989 |
files | src/ai/ai_instance.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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;