Skip to content

Commit 974b379

Browse files
fix: NREs when trying to quit (#516) (#531)
Added null check in NetworkLatencyWarning (cherry picked from commit 057bad5)
1 parent 9978ce0 commit 974b379

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/BossRoom/Scripts/Shared/Game/UI/Editor/NetworkLatencyWarning.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class NetworkLatencyWarning : MonoBehaviour
2020

2121
void Update()
2222
{
23-
if (NetworkManager.Singleton.IsClient || NetworkManager.Singleton.IsServer)
23+
if (NetworkManager.Singleton != null && (NetworkManager.Singleton.IsClient || NetworkManager.Singleton.IsServer))
2424
{
2525
var chosenTransport = NetworkManager.Singleton.NetworkConfig.NetworkTransport;
2626

0 commit comments

Comments
 (0)