Pull out local var to make sure it's lifetime (and thus the internal c_str() pointer) is longer than the if block.
parent
1d94fc7ce6
commit
478630d338
|
|
@ -206,10 +206,10 @@ void FSDiscordConnect::updateRichPresence()
|
|||
memset(&discordPresence, 0, sizeof(discordPresence));
|
||||
discordPresence.state = region_name.c_str();
|
||||
|
||||
std::string name;
|
||||
if (RlvActions::canShowName(RlvActions::SNC_DEFAULT, gAgentID) && gSavedPerAccountSettings.getBOOL("FSShareNameToDiscord"))
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
std::string name;
|
||||
if (LLAvatarNameCache::get(gAgentID, &av_name))
|
||||
{
|
||||
name = av_name.getCompleteName(true, true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue