summaryrefslogtreecommitdiff
path: root/indra/newview/llscripteditorws.cpp
diff options
context:
space:
mode:
authorMike <contact@mikelittman.me>2026-10-08 06:47:32 -0500
committerGitHub <noreply@github.com>2026-10-08 19:47:32 +0800
commitc538254fbd77df962b627460d863911aa2196988 (patch)
tree7ad27e28d217108acb12fb199492550e106c3ea5 /indra/newview/llscripteditorws.cpp
parent55922ee44aad5824e9b18bba750ec06736c87e62 (diff)
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.
Diffstat (limited to 'indra/newview/llscripteditorws.cpp')
-rw-r--r--indra/newview/llscripteditorws.cpp8
1 files changed, 7 insertions, 1 deletions
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)