From 7067b31a6114089217e482bfecc58fd56bed4272 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Fri, 26 Jun 2009 09:39:58 +0200 Subject: BROKEN logoff/relog crashing inconsistently on various startup states. --- 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 1d353fa..ccecef9 100644 --- a/linden/indra/newview/llcallingcard.cpp +++ b/linden/indra/newview/llcallingcard.cpp @@ -136,8 +136,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