Core/Wintergrasp: fix possible crash on startup

This commit is contained in:
Kandera
2012-08-27 12:30:03 -04:00
parent 09821b4953
commit 31dd9de068

View File

@@ -178,7 +178,7 @@ bool BattlefieldWG::SetupBattlefield()
GameObject* go = SpawnGameObject(WGGameObjectBuilding[i].entry, WGGameObjectBuilding[i].x, WGGameObjectBuilding[i].y, WGGameObjectBuilding[i].z, WGGameObjectBuilding[i].o);
BfWGGameObjectBuilding* b = new BfWGGameObjectBuilding(this);
b->Init(go, WGGameObjectBuilding[i].type, WGGameObjectBuilding[i].WorldState, WGGameObjectBuilding[i].nameId);
if (!m_IsEnabled && go->GetGOData()->id == GO_WINTERGRASP_VAULT_GATE)
if (!m_IsEnabled && go->GetGOInfo()->entry == GO_WINTERGRASP_VAULT_GATE)
go->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED);
BuildingsInZone.insert(b);
}