From ff11d6d60190ade6a0faeabd22e05290ffdb26b9 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 3 Dec 2015 14:16:42 +0100 Subject: [PATCH] Fix friendlist-related startup bugs: * Reset variables on each iteration * Can't add friends that came without agent ID --- indra/newview/llstartup.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index fdb60998b2..a16659ce8e 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2266,16 +2266,25 @@ bool idle_startup() if(buddy_list.isDefined()) { LLAvatarTracker::buddy_map_t list; - LLUUID agent_id; - S32 has_rights = 0, given_rights = 0; + // Reset on each iteration + //LLUUID agent_id; + //S32 has_rights = 0, given_rights = 0; + // for(LLSD::array_const_iterator it = buddy_list.beginArray(), end = buddy_list.endArray(); it != end; ++it) { + // Reset on each iteration + LLUUID agent_id; + S32 has_rights = 0, given_rights = 0; + // + LLSD buddy_id = (*it)["buddy_id"]; if(buddy_id.isDefined()) { agent_id = buddy_id.asUUID(); } + // Can't add "friends" that have no ID + else continue; LLSD buddy_rights_has = (*it)["buddy_rights_has"]; if(buddy_rights_has.isDefined())