*Check IsInWorld() when calling GetMap() in RemoveFromWorld(). This may fix some crash bugs.
--HG-- branch : trunk
This commit is contained in:
1 parent
c9707d3c7f
commit
9bb7807935
2 files changed
+12
-9
No files matched your search
+1
-1
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user