SL-15999 - noninteractive sessions should quit cleanly when they get a close message. Removed some possible crashes

meow-7.2.2
Brad Payne (Vir Linden) 2021-09-29 16:50:32 +01:00
parent e16105cab0
commit 3c4198e4b5
5 changed files with 25 additions and 5 deletions

View File

@ -2761,6 +2761,8 @@ bool LLAppViewer::initConfiguration()
tempSetControl("SLURLPassToOtherInstance", "FALSE");
tempSetControl("RenderWater", "FALSE");
tempSetControl("FlyingAtExit", "FALSE");
tempSetControl("WindowWidth", "1024");
tempSetControl("WindowHeight", "200");
LLError::setEnabledLogTypesMask(0);
llassert_always(!gSavedSettings.getBOOL("SLURLPassToOtherInstance"));
}

View File

@ -119,8 +119,11 @@ BOOL LLViewerDynamicTexture::render()
void LLViewerDynamicTexture::preRender(BOOL clear_depth)
{
gPipeline.allocatePhysicsBuffer();
llassert(mFullWidth <= static_cast<S32>(gPipeline.mPhysicsDisplay.getWidth()));
llassert(mFullHeight <= static_cast<S32>(gPipeline.mPhysicsDisplay.getHeight()));
if (!gNonInteractive)
{
llassert(mFullWidth <= static_cast<S32>(gPipeline.mPhysicsDisplay.getWidth()));
llassert(mFullHeight <= static_cast<S32>(gPipeline.mPhysicsDisplay.getHeight()));
}
if (gGLManager.mHasFramebufferObject && gPipeline.mPhysicsDisplay.isComplete() && !gGLManager.mIsATI)
{ //using offscreen render target, just use the bottom left corner

View File

@ -2423,6 +2423,10 @@ void translateFailure(LLChat chat, LLSD toastArgs, int status, const std::string
void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
{
if (gNonInteractive)
{
return;
}
LLChat chat;
std::string mesg;
std::string from_name;

View File

@ -1516,8 +1516,15 @@ BOOL LLViewerWindow::handleCloseRequest(LLWindow *window)
void LLViewerWindow::handleQuit(LLWindow *window)
{
LL_INFOS() << "Window forced quit" << LL_ENDL;
LLAppViewer::instance()->forceQuit();
if (gNonInteractive)
{
LLAppViewer::instance()->requestQuit();
}
else
{
LL_INFOS() << "Window forced quit" << LL_ENDL;
LLAppViewer::instance()->forceQuit();
}
}
void LLViewerWindow::handleResize(LLWindow *window, S32 width, S32 height)
@ -2556,7 +2563,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
mWindow->setMinSize(min_window_width, min_window_height);
LLCoordScreen window_rect;
if (mWindow->getSize(&window_rect))
if (!gNonInteractive && mWindow->getSize(&window_rect))
{
// Only save size if not maximized
gSavedSettings.setU32("WindowWidth", window_rect.mX);

View File

@ -150,6 +150,10 @@ void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16
// public static
void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
{
if (gNonInteractive)
{
return;
}
U32 agent_flags;
msg->getU32Fast(_PREHASH_AgentData, _PREHASH_Flags, agent_flags);