From 6644fa86ee30380a37c54134cc057c6003ca6dc8 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sat, 17 Jan 2009 22:22:53 +0000 Subject: (svn r15133) -Fix: Crash if no NoAIs are present. --- src/ai/ai_instance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp index 5f95b7d60..8d57e6da8 100644 --- a/src/ai/ai_instance.cpp +++ b/src/ai/ai_instance.cpp @@ -247,7 +247,7 @@ void AIInstance::Died() 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; -- cgit v1.2.3-54-g00ecf