Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-07-31 12:43:43 +0000
committerStijn Buys <ingar@osirion.org>2008-07-31 12:43:43 +0000
commit3da609588ad6fe7eb0581e4678a2ec8c6c1c4a18 (patch)
tree6824ff50935275424156f34fd5ec7912c1f4b055 /src/core/entity.cc
parent02f6bfcef4f2e8b0fdbf12c652ab202edbeed19a (diff)
more heisenbugs fixes
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r--src/core/entity.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc
index 98fef0e..20e1b05 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -56,6 +56,7 @@ void Entity::erase(unsigned int id)
Registry::iterator it = entity_registry.find(id);
if (it != entity_registry.end()) {
delete((*it).second);
+ (*it).second = 0;
entity_registry.erase(it);
} else {
con_warn << "Could not erase entity " << id << "!\n";
@@ -171,8 +172,10 @@ Entity::Entity(std::istream & is)
Entity::~Entity()
{
- if (entity_clientstate)
+ if (entity_clientstate) {
delete entity_clientstate;
+ entity_clientstate = 0;
+ }
if (entity_zone)
entity_zone->remove(this);