diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-11-01 01:29:06 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-11-01 17:54:05 +0200 |
commit | 0114be2c155ed5a3de17f6b49d06fab607b9d6bf (patch) | |
tree | bdd1ee334c90b017403215bf874ed443dd75fc6f /indra/newview/llvoicewebrtc.cpp | |
parent | cbd713037e5636b9f3c360332e23e0e29d2972ce (diff) |
viewer#2985 Odd crash when notifying voice observers
Crash points at enableDisableCallBtn, but button's floater was cleaned
earlier and has a removeObserver call so an observer record should be
long gone. Likely something else is going on.
Went over various callbacks and made sure they are cleaned. But in case
floater somehow remained, added mSession = nullptr.
Diffstat (limited to 'indra/newview/llvoicewebrtc.cpp')
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index ad8f6927ed..b2e5de5371 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -258,6 +258,8 @@ void LLWebRTCVoiceClient::cleanupSingleton() } cleanUp(); sessionState::clearSessions(); + + mStatusObservers.clear(); } //--------------------------------------------------- @@ -403,8 +405,9 @@ void LLWebRTCVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESt LL_DEBUGS("Voice") << "( " << LLVoiceClientStatusObserver::status2string(status) << " )" << " mSession=" << mSession << LL_ENDL; + bool in_spatial_channel = inSpatialChannel(); LL_DEBUGS("Voice") << " " << LLVoiceClientStatusObserver::status2string(status) << ", session channelInfo " - << getAudioSessionChannelInfo() << ", proximal is " << inSpatialChannel() << LL_ENDL; + << getAudioSessionChannelInfo() << ", proximal is " << in_spatial_channel << LL_ENDL; mIsProcessingChannels = status == LLVoiceClientStatusObserver::STATUS_JOINED; @@ -412,7 +415,7 @@ void LLWebRTCVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESt for (status_observer_set_t::iterator it = mStatusObservers.begin(); it != mStatusObservers.end();) { LLVoiceClientStatusObserver *observer = *it; - observer->onChange(status, channelInfo, inSpatialChannel()); + observer->onChange(status, channelInfo, in_spatial_channel); // In case onError() deleted an entry. it = mStatusObservers.upper_bound(observer); } |