Skip to content

Commit

Permalink
fix: prevent NRE when operating as a separated client and server (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
uweeby committed Jul 14, 2020
1 parent 5986e32 commit e10e198
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/Mirror/Runtime/NetworkSceneManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void OnSceneLoaded(Scene scene, LoadSceneMode mode)
internal void FinishLoadScene()
{
// host mode?
if (client.IsLocalClient)
if (client && client.IsLocalClient)
{
FinishLoadSceneHost();
}
Expand All @@ -138,7 +138,7 @@ internal void FinishLoadScene()
FinishLoadSceneServerOnly();
}
// client-only mode?
else if (client.Active)
else if (client && client.Active)
{
FinishLoadSceneClientOnly();
}
Expand Down

0 comments on commit e10e198

Please sign in to comment.