summaryrefslogtreecommitdiff
path: root/indra/newview/llspeakers.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-02-04 14:43:29 -0500
committerLoren Shih <seraph@lindenlab.com>2010-02-04 14:43:29 -0500
commita93eb24e39458576475482b50ee0016fc4df50f9 (patch)
treeb9f5287712f154215695c5152f3d24c391ca2ae7 /indra/newview/llspeakers.cpp
parentc58e152236abfc1c414eb6c64783334ca9555b58 (diff)
parentfed6c9eb0fa58559c13729b65ecee181f58f3c69 (diff)
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/newview/llspeakers.cpp')
-rw-r--r--indra/newview/llspeakers.cpp17
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;
}