mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
fix: Channel Crash (#15909)
This commit is contained in:
@@ -489,12 +489,11 @@ void Player::UpdateLocalChannels(uint32 newZone)
|
||||
{
|
||||
Channel* usedChannel = nullptr;
|
||||
|
||||
for (JoinedChannelsList::iterator itr = m_channels.begin();
|
||||
itr != m_channels.end(); ++itr)
|
||||
for (Channel* channel : m_channels)
|
||||
{
|
||||
if ((*itr)->GetChannelId() == i)
|
||||
if (channel && channel->GetChannelId() == i)
|
||||
{
|
||||
usedChannel = *itr;
|
||||
usedChannel = channel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user