diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-02-26 17:34:39 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-02-26 17:34:39 -0800 |
commit | 5352954eb65076d877cc74d4328620e910b93d1c (patch) | |
tree | a8bf1c956c0de44a5ab7eb0a2a05d5e9ed29b751 /indra/newview/llspeakers.cpp | |
parent | 13d4257868451d1e3a5797bd02a0e6f749cc0836 (diff) | |
parent | b1891e2982cc03ccd695eae82989d3e58695616c (diff) |
automated merge
Diffstat (limited to 'indra/newview/llspeakers.cpp')
-rw-r--r-- | indra/newview/llspeakers.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 35d17687a8..4878e9646f 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -205,7 +205,7 @@ void LLSpeakersDelayActionsStorage::setActionTimer(const LLUUID& speaker_id) } } -void LLSpeakersDelayActionsStorage::unsetActionTimer(const LLUUID& speaker_id) +void LLSpeakersDelayActionsStorage::unsetActionTimer(const LLUUID& speaker_id, bool delete_it) { if (mActionTimersMap.size() == 0) return; @@ -213,7 +213,10 @@ void LLSpeakersDelayActionsStorage::unsetActionTimer(const LLUUID& speaker_id) if (it_speaker != mActionTimersMap.end()) { - delete it_speaker->second; + if (delete_it) + { + delete it_speaker->second; + } mActionTimersMap.erase(it_speaker); } } @@ -230,16 +233,15 @@ void LLSpeakersDelayActionsStorage::removeAllTimers() bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_id) { - unsetActionTimer(speaker_id); + bool delete_it = false; // we're *in* this timer, return true to delete it, don't manually delete it + unsetActionTimer(speaker_id, delete_it); if (mActionCallback) { mActionCallback(speaker_id); } - // do not return true to avoid deleting of an timer twice: - // in LLSpeakersDelayActionsStorage::unsetActionTimer() & LLEventTimer::updateClass() - return false; + return true; } @@ -291,7 +293,8 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin } } - mSpeakerDelayRemover->unsetActionTimer(speakerp->mID); + bool delete_it = true; + mSpeakerDelayRemover->unsetActionTimer(speakerp->mID, delete_it); return speakerp; } |