fix: Channel Crash (#15909)

This commit is contained in:
Angelo Venturini
2023-04-18 22:51:58 -03:00
committed by GitHub
parent 88dcf4c300
commit c84123b607

View File

@@ -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;
}
}