From e4105bc8ca37af537cdd8da18c031ae8c0d6ae99 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 17 Oct 2024 17:58:04 +0300 Subject: Resolve maint-c post merge shutdown issue #2 --- indra/llwindow/llwindowwin32.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/llwindow/llwindowwin32.cpp') diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 6d8bbe281c..f349c4aea8 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -403,6 +403,7 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool // until after some graphics setup. See SL-20177. -Cosmic,2023-09-18 bool mGLReady = false; bool mGotGLBuffer = false; + bool mShuttingDown = false; }; @@ -4576,12 +4577,14 @@ inline LLWindowWin32::LLWindowWin32Thread::LLWindowWin32Thread() void LLWindowWin32::LLWindowWin32Thread::close() { - if (mWindowHandleThrd) + LL::ThreadPool::close(); + if (!mShuttingDown) { LL_WARNS() << "Closing window thread without using destroy_window_handler" << LL_ENDL; // Workaround for SL-18721 in case window closes too early and abruptly LLSplashScreen::show(); LLSplashScreen::update("..."); // will be updated later + mShuttingDown = true; } } @@ -4793,6 +4796,8 @@ void LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy() return; } + mShuttingDown = true; + // Make sure we don't leave a blank toolbar button. // Also hiding window now prevents user from suspending it // via some action (like dragging it around) -- cgit v1.2.3