diff --git a/src/game/Entities/Object.cpp b/src/game/Entities/Object.cpp index 7f80ae23e2..546af8321f 100644 --- a/src/game/Entities/Object.cpp +++ b/src/game/Entities/Object.cpp @@ -2037,12 +2037,15 @@ void WorldObject::AddToWorld() void WorldObject::RemoveFromWorld() { - if (m_isOnEventNotified) - m_currMap->RemoveFromOnEventNotified(this); + if (IsInWorld()) + { + if (m_isOnEventNotified) + m_currMap->RemoveFromOnEventNotified(this); - if (!m_stringIds.empty()) - for (uint32 stringId : m_stringIds) - m_currMap->RemoveStringIdObject(stringId, this); + if (!m_stringIds.empty()) + for (uint32 stringId : m_stringIds) + m_currMap->RemoveStringIdObject(stringId, this); + } Object::RemoveFromWorld(); } diff --git a/src/game/Entities/Unit.cpp b/src/game/Entities/Unit.cpp index 294994bfc4..ca7118ada3 100644 --- a/src/game/Entities/Unit.cpp +++ b/src/game/Entities/Unit.cpp @@ -9778,7 +9778,7 @@ void Unit::RemoveFromWorld() m_FollowingRefManager.clearReferences(); } - Object::RemoveFromWorld(); + WorldObject::RemoveFromWorld(); } void Unit::CleanupsBeforeDelete()