summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-08-06 13:06:28 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-08-06 13:06:28 -0700
commit9bb2c74dc59073db5ad91e1053f9bd04836b4ce8 (patch)
treed4b6b57f8faf239f1e4343b46233ea6443672311
parent7f4350655224f0c626a7445fef0369324512f324 (diff)
fix for local chat
-rw-r--r--indra/newview/llviewermessage.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 0c61e52bc2..0ed7ab835b 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3077,15 +3077,20 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
{
// I don't know if it's OK to change this here, if
// anything downstream does lookups by name, for instance
- LLAvatarName av_name;
- if (LLAvatarNameCache::useDisplayNames()
- && LLAvatarNameCache::get(from_id, &av_name))
- {
- chat.mFromName = av_name.mDisplayName;
- }
- else
+
+ if (LLAvatarNameCache::useDisplayNames())
{
- chat.mFromName = LLCacheName::cleanFullName(from_name);
+ LLAvatarName av_name;
+ LLAvatarNameCache::get(from_id, &av_name);
+
+ if (!av_name.mDisplayName.empty())
+ {
+ chat.mFromName = av_name.mDisplayName;
+ }
+ else
+ {
+ chat.mFromName = LLCacheName::cleanFullName(from_name);
+ }
}
}
else