close channel event

This commit is contained in:
Henrique Santiago
2012-04-08 01:13:52 -03:00
parent 9c88c525fb
commit c93732a44a
2 changed files with 18 additions and 2 deletions

View File

@@ -291,9 +291,13 @@ void Map::setCentralPosition(const Position& centralPosition)
} else {
for(const auto& pair : m_knownCreatures) {
const CreaturePtr& creature = pair.second;
if(!isAwareOfPosition(creature->getPosition())) {
removeThing(creature);
if(creature) {
if(!isAwareOfPosition(creature->getPosition())) {
removeThing(creature);
}
}
else
logTraceError("invalid creature");
}
}
}