diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2010-02-05 10:10:27 -0800 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2010-02-05 10:10:27 -0800 |
commit | 3c9daac7afeeb31d2feabde59183a2e005a30d7f (patch) | |
tree | 62c58ae3478f4763660687a59ca77491a604e1fa /indra/newview/llspeakers.cpp | |
parent | e00082c644d201291a4f9243f915fc09c320eaa7 (diff) | |
parent | fed6c9eb0fa58559c13729b65ecee181f58f3c69 (diff) |
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 6f9a1ccdbe..786fa24e65 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; } |