Skip to content

Commit

Permalink
Fix occasional NRE
Browse files Browse the repository at this point in the history
  • Loading branch information
js6pak committed Oct 27, 2022
1 parent 9246458 commit da20e09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Reactor/Networking/Patches/ClientPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static bool Prefix(InnerNetClient._HandleGameDataInner_d__39 __instance,
return false;
}

if (ReactorConnection.Instance!.Syncer == Syncer.Host && reader.Tag == InnerNetClient.SceneChangeFlag)
if (reader.Tag == InnerNetClient.SceneChangeFlag && ReactorConnection.Instance?.Syncer == Syncer.Host)
{
var clientId = reader.ReadPackedInt32();
var clientData = innerNetClient.FindClientById(clientId);
Expand Down

0 comments on commit da20e09

Please sign in to comment.