mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Battleground: Attempt to fix a crash
Please report this error if you get it
(cherry picked from commit d1f9cf84a5)
This commit is contained in:
@@ -1722,6 +1722,12 @@ void Battleground::EndNow()
|
||||
// buffs are in their positions when battleground starts
|
||||
void Battleground::HandleTriggerBuff(ObjectGuid go_guid)
|
||||
{
|
||||
if (!FindBgMap())
|
||||
{
|
||||
TC_LOG_ERROR("bg.battleground", "Battleground::HandleTriggerBuff called with null bg map, %s", go_guid.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
GameObject* obj = GetBgMap()->GetGameObject(go_guid);
|
||||
if (!obj || obj->GetGoType() != GAMEOBJECT_TYPE_TRAP || !obj->isSpawned())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user