From 0d5eb3b8e5f9cbd1a851e23df5cc462de73f06ef Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 12 Aug 2010 17:01:20 -0700 Subject: Fixed #381: using voice causes viewer crash on disconnect/quit --- linden/indra/newview/llappviewer.cpp | 3 --- linden/indra/newview/llcallingcard.cpp | 12 ------------ linden/indra/newview/llcallingcard.h | 2 +- linden/indra/newview/llvoiceclient.cpp | 6 +++--- 4 files changed, 4 insertions(+), 19 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index db2854d..7879b36 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -1185,9 +1185,6 @@ bool LLAppViewer::cleanup() llinfos << "Viewer disconnected" << llendflush; - //this deletes all your buddies - LLAvatarTracker::instance().reset(); - if (mQuitRequested) { display_cleanup(); diff --git a/linden/indra/newview/llcallingcard.cpp b/linden/indra/newview/llcallingcard.cpp index d5211d7..db28c7a 100644 --- a/linden/indra/newview/llcallingcard.cpp +++ b/linden/indra/newview/llcallingcard.cpp @@ -137,20 +137,8 @@ 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(); diff --git a/linden/indra/newview/llcallingcard.h b/linden/indra/newview/llcallingcard.h index aad7cec..85a1ab6 100644 --- a/linden/indra/newview/llcallingcard.h +++ b/linden/indra/newview/llcallingcard.h @@ -86,7 +86,7 @@ class LLAvatarTracker { public: static LLAvatarTracker& instance() { return sInstance; } - void reset(); + void track(const LLUUID& avatar_id, const std::string& name); void untrack(const LLUUID& avatar_id); bool isTrackedAgentValid() { return mTrackedAgentValid; } diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index 67e4075..908bedb 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp @@ -4979,7 +4979,7 @@ void LLVoiceClient::sessionState::removeAllParticipants() if(!mParticipantsByUUID.empty()) { - LL_ERRS("Voice") << "Internal error: empty URI map, non-empty UUID map" << LL_ENDL + LL_ERRS("Voice") << "Internal error: empty URI map, non-empty UUID map" << LL_ENDL; } } @@ -6482,7 +6482,7 @@ void LLVoiceClient::deleteSession(sessionState *session) { if(iter->second != session) { - LL_ERRS("Voice") << "Internal error: session mismatch" << LL_ENDL + LL_ERRS("Voice") << "Internal error: session mismatch" << LL_ENDL; } mSessionsByHandle.erase(iter); } @@ -6522,7 +6522,7 @@ void LLVoiceClient::deleteAllSessions() if(!mSessionsByHandle.empty()) { - LL_ERRS("Voice") << "Internal error: empty session map, non-empty handle map" << LL_ENDL + LL_ERRS("Voice") << "Internal error: empty session map, non-empty handle map" << LL_ENDL; } } -- cgit v1.1