diff options
Diffstat (limited to 'indra/newview/llspeakers.cpp')
-rw-r--r-- | indra/newview/llspeakers.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 6f9a1ccdbe..717a8bda1e 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -175,6 +175,11 @@ BOOL LLSpeakerActionTimer::tick() return TRUE; } +void LLSpeakerActionTimer::unset() +{ + mActionCallback = 0; +} + LLSpeakersDelayActionsStorage::LLSpeakersDelayActionsStorage(LLSpeakerActionTimer::action_callback_t action_cb, F32 action_delay) : mActionCallback(action_cb) , mActionDelay(action_delay) @@ -213,7 +218,7 @@ void LLSpeakersDelayActionsStorage::unsetActionTimer(const LLUUID& speaker_id) if (it_speaker != mActionTimersMap.end()) { - delete it_speaker->second; + it_speaker->second->unset(); mActionTimersMap.erase(it_speaker); } } @@ -237,9 +242,7 @@ bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_ mActionCallback(speaker_id); } - // do not return true to avoid deleting of an timer twice: - // in LLSpeakersDelayActionsStorage::unsetActionTimer() & LLEventTimer::updateClass() - return false; + return true; } @@ -292,7 +295,6 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin } mSpeakerDelayRemover->unsetActionTimer(speakerp->mID); - return speakerp; } |