diff --git a/indra/newview/llpanelgeneral.cpp b/indra/newview/llpanelgeneral.cpp index bd6f1be43..812cbc80f 100644 --- a/indra/newview/llpanelgeneral.cpp +++ b/indra/newview/llpanelgeneral.cpp @@ -142,13 +142,13 @@ void LLPanelGeneral::apply() LLComboBox* fade_out_combobox = getChild("fade_out_combobox"); gSavedSettings.setS32("RenderName", fade_out_combobox->getCurrentIndex()); - LLComboBox* namesystem_combobox = getChild("namesystem_combobox"); - LLUICtrl* show_resident_checkbox = getChild("show_resident_checkbox"); - if(gSavedSettings.getS32("PhoenixNameSystem")!=namesystem_combobox->getCurrentIndex() || gSavedSettings.getBOOL("LiruShowLastNameResident")!=show_resident_checkbox->getValue().asBoolean()){ - gSavedSettings.setS32("PhoenixNameSystem", namesystem_combobox->getCurrentIndex()); - gSavedSettings.setBOOL("LiruShowLastNameResident", show_resident_checkbox->getValue()); + S32 namesystem_combobox_index = getChild("namesystem_combobox")->getCurrentIndex(); + BOOL show_resident = getChild("show_resident_checkbox")->getValue(); + if(gSavedSettings.getS32("PhoenixNameSystem")!=namesystem_combobox_index || gSavedSettings.getBOOL("LiruShowLastNameResident")!=show_resident){ + gSavedSettings.setS32("PhoenixNameSystem", namesystem_combobox_index); + gSavedSettings.setBOOL("LiruShowLastNameResident", show_resident); if(gAgent.getRegion()){ - if(namesystem_combobox->getCurrentIndex()<=0 || namesystem_combobox->getCurrentIndex()>2) LLAvatarNameCache::setUseDisplayNames(false); + if(namesystem_combobox_index<=0 || namesystem_combobox_index>2) LLAvatarNameCache::setUseDisplayNames(false); else LLAvatarNameCache::setUseDisplayNames(true); LLVOAvatar::invalidateNameTags(); // Remove all clienttags to get them updated