diff options
Diffstat (limited to 'indra/newview/llagentui.cpp')
-rw-r--r-- | indra/newview/llagentui.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 72ab9235cf..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* avatar_object = gAgent.getAvatarObject(); - if (avatar_object) + if (isAgentAvatarValid()) { - LLNameValue *first_nv = avatar_object->getNVPair("FirstName"); - LLNameValue *last_nv = avatar_object->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 |