Fix this because it shoulda been this from the start, oops.

This commit is contained in:
Lirusaito
2018-08-27 12:27:58 -04:00
parent 03d686a246
commit 8ecbf79199

View File

@@ -586,10 +586,10 @@ LLUUID cmdline_partial_name2key(std::string partial_name)
std::string av_name;
LLStringUtil::toLower(partial_name);
LLWorld::getInstance()->getAvatars(&avatars);
auto instance = (LLFloaterAvatarList::instanceExists() ? &LLFloaterAvatarList::instance() : nullptr);
auto radar = (LLFloaterAvatarList::instanceExists() ? LLFloaterAvatarList::getInstance() : nullptr);
for(const auto& id : avatars)
{
if (LLAvatarListEntry* entry = instance ? instance->getAvatarEntry(id) : nullptr)
if (LLAvatarListEntry* entry = radar ? radar->getAvatarEntry(id) : nullptr)
av_name = entry->getName();
else if (gCacheName->getFullName(id, av_name));
else if (LLVOAvatar* avatarp = gObjectList.findAvatar(id))