diff --git a/Assets/Mirror/Runtime/NetworkServer.cs b/Assets/Mirror/Runtime/NetworkServer.cs index 7c0ff8a7e..d80ae0bea 100644 --- a/Assets/Mirror/Runtime/NetworkServer.cs +++ b/Assets/Mirror/Runtime/NetworkServer.cs @@ -506,9 +506,10 @@ public static void Update() // update all server objects foreach (KeyValuePair kvp in NetworkIdentity.spawned) { - if (kvp.Value != null && kvp.Value.gameObject != null) + NetworkIdentity identity = kvp.Value; + if (identity != null) { - kvp.Value.ServerUpdate(); + identity.ServerUpdate(); } else {