summaryrefslogtreecommitdiff
path: root/indra/newview/llavatariconctrl.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-12-17 18:59:01 -0800
committerMerov Linden <merov@lindenlab.com>2012-12-17 18:59:01 -0800
commit6fe7144104cd8b5bd9c7d215f76afdeafe13b7ee (patch)
treec4f7f5d9b0f03c5beae32ca0f234d1fd4f4d326b /indra/newview/llavatariconctrl.cpp
parent0e4c3070cb6cfb389d708ca459ed2c721c1cc28a (diff)
CHUI-580 : WIP : Protect callback connections passed to LLAvatarNameCache::get() where necessary
Diffstat (limited to 'indra/newview/llavatariconctrl.cpp')
-rwxr-xr-xindra/newview/llavatariconctrl.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index 0db38c947c..60a2c14911 100755
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -261,13 +261,12 @@ void LLAvatarIconCtrl::setValue(const LLSD& value)
void LLAvatarIconCtrl::fetchAvatarName()
{
- if (mAvatarNameCacheConnection.connected())
- {
- mAvatarNameCacheConnection.disconnect();
- }
-
if (mAvatarId.notNull())
{
+ if (mAvatarNameCacheConnection.connected())
+ {
+ mAvatarNameCacheConnection.disconnect();
+ }
mAvatarNameCacheConnection = LLAvatarNameCache::get(mAvatarId, boost::bind(&LLAvatarIconCtrl::onAvatarNameCache, this, _1, _2));
}
}