summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-04-06 15:20:51 -0700
committerRichard Linden <none@none>2011-04-06 15:20:51 -0700
commit1d34e7b90bb9b45e20051d777da5d24dc76dbd50 (patch)
tree4028d274dd824485f7a97d36a48b92e7ff72b357 /indra/newview/llfloaterpreference.cpp
parentb5c834c6fdcee7d7238bebfc561ecee3ecca3589 (diff)
parent75ddf612ad29240d6d34b5044ae09e4295217766 (diff)
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp31
1 files changed, 20 insertions, 11 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index ffbb0efad3..5444c7dc6e 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -285,6 +285,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mGotPersonalInfo(false),
mOriginalIMViaEmail(false),
mLanguageChanged(false),
+ mAvatarDataInitialized(false),
mDoubleClickActionDirty(false),
mFavoritesRecordMayExist(false)
{
@@ -353,14 +354,19 @@ void LLFloaterPreference::processProperties( void* pData, EAvatarProcessorType t
void LLFloaterPreference::storeAvatarProperties( const LLAvatarData* pAvatarData )
{
- mAvatarProperties.avatar_id = gAgent.getID();
- mAvatarProperties.image_id = pAvatarData->image_id;
- mAvatarProperties.fl_image_id = pAvatarData->fl_image_id;
- mAvatarProperties.about_text = pAvatarData->about_text;
- mAvatarProperties.fl_about_text = pAvatarData->fl_about_text;
- mAvatarProperties.profile_url = pAvatarData->profile_url;
- mAvatarProperties.flags = pAvatarData->flags;
- mAvatarProperties.allow_publish = pAvatarData->flags & AVATAR_ALLOW_PUBLISH;
+ if (gAgent.isInitialized() && (gAgent.getID() != LLUUID::null))
+ {
+ mAvatarProperties.avatar_id = gAgent.getID();
+ mAvatarProperties.image_id = pAvatarData->image_id;
+ mAvatarProperties.fl_image_id = pAvatarData->fl_image_id;
+ mAvatarProperties.about_text = pAvatarData->about_text;
+ mAvatarProperties.fl_about_text = pAvatarData->fl_about_text;
+ mAvatarProperties.profile_url = pAvatarData->profile_url;
+ mAvatarProperties.flags = pAvatarData->flags;
+ mAvatarProperties.allow_publish = pAvatarData->flags & AVATAR_ALLOW_PUBLISH;
+
+ mAvatarDataInitialized = true;
+ }
}
void LLFloaterPreference::processProfileProperties(const LLAvatarData* pAvatarData )
@@ -371,12 +377,15 @@ void LLFloaterPreference::processProfileProperties(const LLAvatarData* pAvatarDa
void LLFloaterPreference::saveAvatarProperties( void )
{
mAvatarProperties.allow_publish = getChild<LLUICtrl>("online_searchresults")->getValue();
- if ( mAvatarProperties.allow_publish )
+ if (mAvatarProperties.allow_publish)
{
mAvatarProperties.flags |= AVATAR_ALLOW_PUBLISH;
}
-
- LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate( &mAvatarProperties );
+
+ if (mAvatarDataInitialized)
+ {
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate( &mAvatarProperties );
+ }
}