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