diff --git a/QSB/QSBNetworkManager.cs b/QSB/QSBNetworkManager.cs index 49ef38d9..65254a34 100644 --- a/QSB/QSBNetworkManager.cs +++ b/QSB/QSBNetworkManager.cs @@ -87,11 +87,19 @@ namespace QSB private string GetPlayerName() { - var profileManager = StandaloneProfileManager.SharedInstance; - profileManager.Initialize(); - var profile = profileManager.GetValue("_currentProfile"); - var profileName = profile.profileName; - return profileName; + try + { + var profileManager = StandaloneProfileManager.SharedInstance; + profileManager.Initialize(); + var profile = profileManager._currentProfile; + var profileName = profile.profileName; + return profileName; + } + catch (Exception ex) + { + DebugLog.ToConsole($"Error - Exception when getting player name : {ex}", MessageType.Error); + return "Player"; + } } private void SetupNetworkId(GameObject go, int assetId)