summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ai/ai_instance.cpp2
1 files changed, 1 insertions, 1 deletions
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;