diff --git a/SharedLibraryCore/Server.cs b/SharedLibraryCore/Server.cs
index 3062e064d..d78182813 100644
--- a/SharedLibraryCore/Server.cs
+++ b/SharedLibraryCore/Server.cs
@@ -172,7 +172,10 @@ namespace SharedLibraryCore
///
public List GetClientsAsList()
{
- return Clients.FindAll(x => x != null && x.NetworkId != 0);
+ lock (Clients)
+ {
+ return Clients.FindAll(client => client is not null && client.NetworkId != 0);
+ }
}
///