Fix LL_ERRS crash when disconnecting while under @shownames RLVa restriction

master
Ansariel 2020-11-18 22:37:38 +01:00
parent 1cf168ac85
commit 2f4e2c0b4f
1 changed files with 5 additions and 5 deletions

View File

@ -2518,7 +2518,7 @@ void RlvBehaviourToggleHandler<RLV_BHVR_SHOWINV>::onCommandToggle(ERlvBehaviour
template<> template<>
void RlvBehaviourToggleHandler<RLV_BHVR_SHOWNAMES>::onCommandToggle(ERlvBehaviour eBhvr, bool fHasBhvr)
{
if (LLApp::isExiting())
if (LLApp::isExiting() || gDoDisconnect)
return; // Nothing to do if the viewer is shutting down
// Update the shownames context
@ -2530,10 +2530,10 @@ void RlvBehaviourToggleHandler<RLV_BHVR_SHOWNAMES>::onCommandToggle(ERlvBehaviou
//RLV_ASSERT( (pPeoplePanel) && (pPeoplePanel->getNearbyList()) );
//if ( (pPeoplePanel) && (pPeoplePanel->getNearbyList()) )
// pPeoplePanel->getNearbyList()->updateAvatarNames();
FSRadar* pRadar = FSRadar::getInstance();
RLV_ASSERT( (pRadar) );
if ( (pRadar) )
pRadar->updateNames();
if (FSRadar::instanceExists())
{
FSRadar::instance().updateNames();
}
// </FS:Ansariel> [Standalone radar]
// Refresh the speaker list