mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Merge pull request #10636 from jackpoz/mindvision_fix
Core/Aura: Fix SPELL_AURA_BIND_SIGHT invalid read
This commit is contained in:
@@ -2114,6 +2114,10 @@ void Map::AddObjectToRemoveList(WorldObject* obj)
|
||||
void Map::AddObjectToSwitchList(WorldObject* obj, bool on)
|
||||
{
|
||||
ASSERT(obj->GetMapId() == GetId() && obj->GetInstanceId() == GetInstanceId());
|
||||
// i_objectsToSwitch is iterated only in Map::RemoveAllObjectsInRemoveList() and it uses
|
||||
// the contained objects only if GetTypeId() == TYPEID_UNIT , so we can return in all other cases
|
||||
if (obj->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
std::map<WorldObject*, bool>::iterator itr = i_objectsToSwitch.find(obj);
|
||||
if (itr == i_objectsToSwitch.end())
|
||||
|
||||
Reference in New Issue
Block a user