summaryrefslogtreecommitdiff
path: root/indra/newview/llscripteditorws.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2025-10-07 15:59:32 -0700
committerRider Linden <rider@lindenlab.com>2025-10-07 16:06:07 -0700
commit696e1b1655e28cc1447539d303ca1bcbb3450552 (patch)
tree770cc8a858afea0f709e9ea39fbfd31e8168ca35 /indra/newview/llscripteditorws.cpp
parent8794f45ecfaf1132d494f3b7c1e0c432fa7283d6 (diff)
A couple of naming issues, and accessing an iterator post erase.
Diffstat (limited to 'indra/newview/llscripteditorws.cpp')
-rw-r--r--indra/newview/llscripteditorws.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llscripteditorws.cpp b/indra/newview/llscripteditorws.cpp
index 53ef1d4dc2..cecac23383 100644
--- a/indra/newview/llscripteditorws.cpp
+++ b/indra/newview/llscripteditorws.cpp
@@ -83,7 +83,7 @@ void LLScriptEditorWSServer::onStarted()
auto server = that.lock();
if (server && server->isRunning())
{
- server->broadcastLangugeChange();
+ server->broadcastLanguageChange();
}
});
}
@@ -150,15 +150,15 @@ void LLScriptEditorWSServer::unsubscribeEditor(const std::string &script_id)
auto it = mSubscriptions.find(script_id);
if (it != mSubscriptions.end())
{
- mSubscriptions.erase(it);
S32 connection_id = it->second.mConnectionID;
+ auto connection = it->second.mConnection.lock();
+ mSubscriptions.erase(it);
ptrdiff_t count = std::count_if(mSubscriptions.begin(), mSubscriptions.end(), [connection_id](const auto& pair) {
return pair.second.mConnectionID == connection_id;
});
- auto connection = it->second.mConnection.lock();
if (connection && !count)
{ // We have removed the last subscription, close the connection
- LL_DEBUGS("ScriptEditorWS") << "Closing connection ID " << it->second.mConnectionID <<
+ LL_DEBUGS("ScriptEditorWS") << "Closing connection ID " << connection_id <<
" as last subscription was removed" << LL_ENDL;
connection->sendDisconnect(LLScriptEditorWSConnection::REASON_EDITOR_CLOSED, "Editor closed");
}