fix(Core/Channels): Don't use deleted pointer in channel name creation. (#21435)
This commit is contained in:
parent
0db39f76de
commit
db49562a6a
1 changed files with 4 additions and 5 deletions
|
|
@ -550,17 +550,16 @@ void Player::UpdateLocalChannels(uint32 newZone)
|
|||
// names are not changing
|
||||
|
||||
char new_channel_name_buf[100];
|
||||
char const* currentNameExt;
|
||||
std::string currentNameExt;
|
||||
|
||||
if (channel->flags & CHANNEL_DBC_FLAG_CITY_ONLY)
|
||||
currentNameExt = sObjectMgr->GetAcoreStringForDBCLocale(
|
||||
LANG_CHANNEL_CITY).c_str();
|
||||
currentNameExt = sObjectMgr->GetAcoreStringForDBCLocale(LANG_CHANNEL_CITY);
|
||||
else
|
||||
currentNameExt = current_zone_name.c_str();
|
||||
currentNameExt = current_zone_name;
|
||||
|
||||
snprintf(new_channel_name_buf, 100,
|
||||
channel->pattern[m_session->GetSessionDbcLocale()],
|
||||
currentNameExt);
|
||||
currentNameExt.c_str());
|
||||
|
||||
joinChannel = cMgr->GetJoinChannel(new_channel_name_buf,
|
||||
channel->ChannelID);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue