mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix: NetworkIdentity.RebuildObservers: added missing null check for observers coming from components that implement OnRebuildObservers. Previously this caused a NullReferenceException.
This commit is contained in:
parent
26c0c03fd8
commit
a5f495a774
@ -1110,7 +1110,7 @@ public void RebuildObservers(bool initialize)
|
||||
observers.Clear();
|
||||
foreach (NetworkConnection conn in newObservers)
|
||||
{
|
||||
if (conn.isReady)
|
||||
if (conn != null && conn.isReady)
|
||||
observers.Add(conn.connectionId, conn);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user