Skip to content

Commit 057bad5

Browse files
fix: NREs when trying to quit (#516)
Added null check in NetworkLatencyWarning
1 parent 11f70ee commit 057bad5

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)