*Check IsInWorld() when calling GetMap() in RemoveFromWorld(). This may fix some crash bugs.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-22 17:03:01 -06:00
parent c9707d3c7f
commit 9bb7807935
2 changed files with 12 additions and 9 deletions

View File

@@ -1101,7 +1101,7 @@ void WorldObject::AddToWorld()
void WorldObject::RemoveFromWorld()
{
if(m_isActive && !isType(TYPEMASK_PLAYER))
if(m_isActive && IsInWorld() && !isType(TYPEMASK_PLAYER))
GetMap()->RemoveActiveObject(this);
Object::RemoveFromWorld();
}