diff options
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/llappviewer.cpp | 3 | ||||
-rw-r--r-- | linden/indra/newview/llcallingcard.cpp | 12 | ||||
-rw-r--r-- | linden/indra/newview/llcallingcard.h | 2 |
3 files changed, 16 insertions, 1 deletions
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index b3f3e59..accc523 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -1185,6 +1185,9 @@ bool LLAppViewer::cleanup() | |||
1185 | 1185 | ||
1186 | llinfos << "Viewer disconnected" << llendflush; | 1186 | llinfos << "Viewer disconnected" << llendflush; |
1187 | 1187 | ||
1188 | //this deletes all your buddies | ||
1189 | LLAvatarTracker::instance().reset(); | ||
1190 | |||
1188 | if (mQuitRequested) | 1191 | if (mQuitRequested) |
1189 | { | 1192 | { |
1190 | display_cleanup(); | 1193 | display_cleanup(); |
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() | |||
137 | deleteTrackingData(); | 137 | deleteTrackingData(); |
138 | std::for_each(mObservers.begin(), mObservers.end(), DeletePointer()); | 138 | std::for_each(mObservers.begin(), mObservers.end(), DeletePointer()); |
139 | std::for_each(mBuddyInfo.begin(), mBuddyInfo.end(), DeletePairedPointer()); | 139 | std::for_each(mBuddyInfo.begin(), mBuddyInfo.end(), DeletePairedPointer()); |
140 | mObservers.erase(mObservers.begin(), mObservers.end()); | ||
141 | mBuddyInfo.erase(mBuddyInfo.begin(), mBuddyInfo.end()); | ||
140 | } | 142 | } |
141 | 143 | ||
144 | |||
145 | void LLAvatarTracker::reset() | ||
146 | { | ||
147 | std::for_each(mBuddyInfo.begin(), mBuddyInfo.end(), DeletePairedPointer()); | ||
148 | mBuddyInfo.erase(mBuddyInfo.begin(), mBuddyInfo.end()); | ||
149 | mModifyMask |= LLFriendObserver::REMOVE; | ||
150 | notifyObservers(); | ||
151 | } | ||
152 | |||
153 | |||
142 | void LLAvatarTracker::track(const LLUUID& avatar_id, const std::string& name) | 154 | void LLAvatarTracker::track(const LLUUID& avatar_id, const std::string& name) |
143 | { | 155 | { |
144 | deleteTrackingData(); | 156 | deleteTrackingData(); |
diff --git a/linden/indra/newview/llcallingcard.h b/linden/indra/newview/llcallingcard.h index 0db5376..d3f53c6 100644 --- a/linden/indra/newview/llcallingcard.h +++ b/linden/indra/newview/llcallingcard.h | |||
@@ -86,7 +86,7 @@ class LLAvatarTracker | |||
86 | { | 86 | { |
87 | public: | 87 | public: |
88 | static LLAvatarTracker& instance() { return sInstance; } | 88 | static LLAvatarTracker& instance() { return sInstance; } |
89 | 89 | void reset(); | |
90 | void track(const LLUUID& avatar_id, const std::string& name); | 90 | void track(const LLUUID& avatar_id, const std::string& name); |
91 | void untrack(const LLUUID& avatar_id); | 91 | void untrack(const LLUUID& avatar_id); |
92 | bool isTrackedAgentValid() { return mTrackedAgentValid; } | 92 | bool isTrackedAgentValid() { return mTrackedAgentValid; } |