From 05dd11698819f47e8ea36803a1dc980f4e0ed95d Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Fri, 1 Oct 2010 14:15:16 +0200 Subject: fix friendlist not cleared on logout --- linden/indra/newview/llcallingcard.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'linden/indra/newview/llcallingcard.cpp') diff --git a/linden/indra/newview/llcallingcard.cpp b/linden/indra/newview/llcallingcard.cpp index 155fb60..15be0eb 100644 --- a/linden/indra/newview/llcallingcard.cpp +++ b/linden/indra/newview/llcallingcard.cpp @@ -137,8 +137,20 @@ LLAvatarTracker::~LLAvatarTracker() deleteTrackingData(); std::for_each(mObservers.begin(), mObservers.end(), DeletePointer()); std::for_each(mBuddyInfo.begin(), mBuddyInfo.end(), DeletePairedPointer()); + mObservers.erase(mObservers.begin(), mObservers.end()); + mBuddyInfo.erase(mBuddyInfo.begin(), mBuddyInfo.end()); } + +void LLAvatarTracker::reset() +{ + std::for_each(mBuddyInfo.begin(), mBuddyInfo.end(), DeletePairedPointer()); + mBuddyInfo.erase(mBuddyInfo.begin(), mBuddyInfo.end()); + mModifyMask |= LLFriendObserver::REMOVE; + notifyObservers(); +} + + void LLAvatarTracker::track(const LLUUID& avatar_id, const std::string& name) { deleteTrackingData(); -- cgit v1.1