Skip to content

Commit

Permalink
Remove wrapper to UnloadLevel call to fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
slash-under committed Sep 30, 2022
1 parent 42fc9f7 commit 1f04c37
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/csm/Networking/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,8 @@ public void Disconnect()

if (needsUnload)
{
Singleton<SimulationManager>.instance.m_ThreadingWrapper.QueueMainThread(() =>
{
// Go back to the main menu after disconnecting
Singleton<LoadingManager>.instance.UnloadLevel();
});
// Go back to the main menu after disconnecting
Singleton<LoadingManager>.instance.UnloadLevel();
}

Log.Info("Disconnected from server");
Expand Down

0 comments on commit 1f04c37

Please sign in to comment.