diff options
author | Sergei Litovchuk <slitovchuk@productengine.com> | 2009-11-17 17:23:07 +0200 |
---|---|---|
committer | Sergei Litovchuk <slitovchuk@productengine.com> | 2009-11-17 17:23:07 +0200 |
commit | 4f35650f0427f6d6db10da0058d2850c30f98904 (patch) | |
tree | a364641a9e0601791bf735e5ccc80a981f046d48 /indra/newview/llvoicechannel.cpp | |
parent | 7b10039d4512da390fe39ac9dbb86d6d5febe774 (diff) |
Fixed critical bug EXT-2469 "Viewer crashes in the Floater Call".
- Re-factored Floater Call initialization and destruction logic.
- Removing voice channel participants observer when call ends.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r-- | indra/newview/llvoicechannel.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index ae32ec7d11..21054dacd0 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llagent.h" +#include "llfloatercall.h" #include "llfloaterreg.h" #include "llimview.h" #include "llnotifications.h" @@ -408,9 +409,14 @@ void LLVoiceChannel::doSetState(const EState& new_state) void LLVoiceChannel::toggleCallWindowIfNeeded(EState state) { + LLFloaterCall* floater = dynamic_cast<LLFloaterCall*>(LLFloaterReg::getInstance("voice_call", mSessionID)); + if (!floater) + return; + if (state == STATE_CONNECTED) { - LLFloaterReg::showInstance("voice_call", mSessionID); + floater->init(mSessionID); + floater->openFloater(mSessionID); } // By checking that current state is CONNECTED we make sure that the call window // has been shown, hence there's something to hide. This helps when user presses @@ -418,7 +424,8 @@ void LLVoiceChannel::toggleCallWindowIfNeeded(EState state) // *TODO: move this check to LLFloaterCall? else if (state == STATE_HUNG_UP && mState == STATE_CONNECTED) { - LLFloaterReg::hideInstance("voice_call", mSessionID); + floater->reset(); + floater->closeFloater(); } } |