mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
*Check IsInWorld() when calling GetMap() in RemoveFromWorld(). This may fix some crash bugs.
--HG-- branch : trunk
This commit is contained in:
@@ -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