[FIXED] Assertion failure on LLApp::isQuitting() in RlvHandler::cleanup() when disconnecting

-> Also prefer using isExiting() over isQuitting()
master
Kitty Barnett 2020-09-13 20:52:39 +02:00
parent d69604b866
commit 487a487ce2
4 changed files with 15 additions and 9 deletions

View File

@ -378,7 +378,10 @@ const std::string START_MARKER_FILE_NAME("SecondLife.start_marker");
const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker");
const std::string LLERROR_MARKER_FILE_NAME("SecondLife.llerror_marker");
const std::string LOGOUT_MARKER_FILE_NAME("SecondLife.logout_marker");
static BOOL gDoDisconnect = FALSE;
//static BOOL gDoDisconnect = FALSE;
// [RLVa:KB] - Checked: RLVa-2.3
BOOL gDoDisconnect = FALSE;
// [/RLVa:KB]
static std::string gLaunchFileOnQuit;
// Used on Win32 for other apps to identify our window (eg, win_setup)

View File

@ -136,7 +136,7 @@ void RlvSettings::initClass()
// Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d
void RlvSettings::updateLoginLastLocation()
{
if ( (!LLApp::isQuitting()) && (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) )
if ( (!LLApp::isExiting()) && (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) )
{
BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || (!RlvActions::canStand());
if (gSavedPerAccountSettings.getBOOL(RLV_SETTING_LOGINLASTLOCATION) != fValue)

View File

@ -70,6 +70,9 @@
// Boost includes
#include <boost/algorithm/string.hpp>
// llappviewer.cpp
extern BOOL gDoDisconnect;
// ============================================================================
// Static variable initialization
//
@ -158,7 +161,7 @@ void RlvHandler::cleanup()
//
// Clean up any restrictions that are still active
//
RLV_ASSERT(LLApp::isQuitting()); // Several commands toggle debug settings but won't if they know the viewer is quitting
RLV_ASSERT(LLApp::isExiting() || gDoDisconnect); // Several commands toggle debug settings but won't if they know the viewer is quitting
// Assume we have no way to predict how m_Objects will change so make a copy ahead of time
uuid_vec_t idRlvObjects;
@ -2385,7 +2388,7 @@ ERlvCmdRet RlvBehaviourHandler<RLV_BHVR_SHOWHOVERTEXT>::onCommand(const RlvComma
template<> template<>
void RlvBehaviourToggleHandler<RLV_BHVR_SHOWINV>::onCommandToggle(ERlvBehaviour eBhvr, bool fHasBhvr)
{
if (LLApp::isQuitting())
if (LLApp::isExiting())
return; // Nothing to do if the viewer is shutting down
//
@ -2440,7 +2443,7 @@ void RlvBehaviourToggleHandler<RLV_BHVR_SHOWINV>::onCommandToggle(ERlvBehaviour
template<> template<>
void RlvBehaviourToggleHandler<RLV_BHVR_SHOWNAMES>::onCommandToggle(ERlvBehaviour eBhvr, bool fHasBhvr)
{
if (LLApp::isQuitting())
if (LLApp::isExiting())
return; // Nothing to do if the viewer is shutting down
// Update the shownames context
@ -2477,7 +2480,7 @@ template<> template<>
ERlvCmdRet RlvBehaviourHandler<RLV_BHVR_SHOWNAMES>::onCommand(const RlvCommand& rlvCmd, bool& fRefCount)
{
ERlvCmdRet eRet = RlvBehaviourGenericHandler<RLV_OPTION_NONE_OR_EXCEPTION>::onCommand(rlvCmd, fRefCount);
if ( (RLV_RET_SUCCESS == eRet) && (rlvCmd.hasOption()) && (!LLApp::isQuitting()) )
if ( (RLV_RET_SUCCESS == eRet) && (rlvCmd.hasOption()) && (!LLApp::isExiting()) )
{
const LLUUID idAgent = RlvCommandOptionHelper::parseOption<LLUUID>(rlvCmd.getOption());
@ -2502,7 +2505,7 @@ ERlvCmdRet RlvBehaviourHandler<RLV_BHVR_SHOWNAMES>::onCommand(const RlvCommand&
template<> template<>
void RlvBehaviourToggleHandler<RLV_BHVR_SHOWNAMETAGS>::onCommandToggle(ERlvBehaviour eBhvr, bool fHasBhvr)
{
if (LLApp::isQuitting())
if (LLApp::isExiting())
return; // Nothing to do if the viewer is shutting down
// Update the shownames context
@ -2526,7 +2529,7 @@ ERlvCmdRet RlvBehaviourHandler<RLV_BHVR_SHOWNAMETAGS>::onCommand(const RlvComman
template<> template<>
void RlvBehaviourToggleHandler<RLV_BHVR_SHOWNEARBY>::onCommandToggle(ERlvBehaviour eBhvr, bool fHasBhvr)
{
if (LLApp::isQuitting())
if (LLApp::isExiting())
return; // Nothing to do if the viewer is shutting down
// Refresh the nearby people list

View File

@ -77,7 +77,7 @@ RlvUIEnabler::RlvUIEnabler()
// Checked: 2010-02-28 (RLVa-1.4.0a) | Added: RLVa-1.2.0a
void RlvUIEnabler::onBehaviourToggle(ERlvBehaviour eBhvr, ERlvParamType eType)
{
bool fQuitting = LLApp::isQuitting();
bool fQuitting = LLApp::isExiting();
for (behaviour_handler_map_t::const_iterator itHandler = m_Handlers.lower_bound(eBhvr), endHandler = m_Handlers.upper_bound(eBhvr);
itHandler != endHandler; ++itHandler)
{