summaryrefslogtreecommitdiff
path: root/indra/newview/llagentui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagentui.cpp')
-rw-r--r--indra/newview/llagentui.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp
index 4601e3241b..c4597ad6f8 100644
--- a/indra/newview/llagentui.cpp
+++ b/indra/newview/llagentui.cpp
@@ -49,12 +49,10 @@
void LLAgentUI::buildName(std::string& name)
{
name.clear();
-
- LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
- if (avatarp)
+ if (isAgentAvatarValid())
{
- LLNameValue *first_nv = avatarp->getNVPair("FirstName");
- LLNameValue *last_nv = avatarp->getNVPair("LastName");
+ LLNameValue *first_nv = gAgentAvatarp->getNVPair("FirstName");
+ LLNameValue *last_nv = gAgentAvatarp->getNVPair("LastName");
if (first_nv && last_nv)
{
name = first_nv->printData() + " " + last_nv->printData();
@@ -73,7 +71,8 @@ void LLAgentUI::buildName(std::string& name)
//static
void LLAgentUI::buildFullname(std::string& name)
{
- if (gAgent.getAvatarObject()) name = gAgent.getAvatarObject()->getFullname();
+ if (isAgentAvatarValid())
+ name = gAgentAvatarp->getFullname();
}
//static