From c538254fbd77df962b627460d863911aa2196988 Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 8 Oct 2026 06:47:32 -0500 Subject: Do not recreate destroyed singletons during shutdown (#31) deleteAll() used to let getInstance() build a replacement, which crashed when the script-editor server posted a toast after LLUI was gone. Shutdown now refuses that construction, and notification adds do nothing once the notification system is gone. --- indra/newview/llscripteditorws.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llscripteditorws.cpp') diff --git a/indra/newview/llscripteditorws.cpp b/indra/newview/llscripteditorws.cpp index 0a3e09fec0..1b4babceec 100644 --- a/indra/newview/llscripteditorws.cpp +++ b/indra/newview/llscripteditorws.cpp @@ -465,7 +465,13 @@ void LLScriptEditorWSServer::onStopped() LL_INFOS("ScriptEditorWS") << "Script editor WebSocket server stopped, all state cleaned up" << LL_ENDL; - LLNotificationsUtil::add("ExternalEditorServerStopped"); + // Skip the toast during shutdown. cleanup() destroys LLUI before + // WebSocket singletons, and constructing this alert crashes in the + // already-freed notification tables. + if (!LLApp::isExiting()) + { + LLNotificationsUtil::add("ExternalEditorServerStopped"); + } } void LLScriptEditorWSServer::onConnectionOpened(const LLWebsocketMgr::WSConnection::ptr_t& connection) -- cgit v1.3