From edb6d6bb6406020d9e49a1898d23e2709c14196d Mon Sep 17 00:00:00 2001
From: Stijn Buys <ingar@osirion.org>
Date: Tue, 19 Oct 2010 00:23:50 +0000
Subject: corrects a bullet segfault when deleteing an EntityControlable

---
 src/core/entity.cc | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src/core')

diff --git a/src/core/entity.cc b/src/core/entity.cc
index 1438466..2b37d95 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -748,6 +748,11 @@ EntityControlable::~EntityControlable()
 {
 	if (entity_owner)
 		entity_owner->remove_asset(this);
+	
+	if (entity_actioninterface) {
+		entity_zone->physics()->removeAction(entity_actioninterface);
+		delete entity_actioninterface;
+	}
 }
 
 void EntityControlable::set_owner(Player *owner)
-- 
cgit v1.2.3