mirror of
https://github.com/mangosfour/server.git
synced 2025-12-28 04:37:04 +00:00
prevent crashes in Player::_LoadArenaTeamInfo()
(cherry picked from commit 9f908e877d054ff9ab973082d631bb7199f292f6) Signed-off-by: Wyk3d <Wyk3d@getmangos.com>
This commit is contained in:
parent
a0edf095d9
commit
03c71517ec
1 changed files with 4 additions and 0 deletions
|
|
@ -13748,6 +13748,10 @@ void Player::_LoadArenaTeamInfo(QueryResult *result)
|
|||
uint32 personal_rating = fields[3].GetUInt32();
|
||||
|
||||
ArenaTeam* aTeam = objmgr.GetArenaTeamById(arenateamid);
|
||||
if(!aTeam) {
|
||||
sLog.outError("FATAL: couldn't load arenateam %u", arenateamid);
|
||||
continue;
|
||||
}
|
||||
uint8 arenaSlot = aTeam->GetSlot();
|
||||
|
||||
m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 6] = arenateamid; // TeamID
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue