Add safety check so this stops crashing when we look at it the wrong way
This commit is contained in:
@@ -99,7 +99,15 @@ namespace Barotrauma
|
|||||||
internal set
|
internal set
|
||||||
{
|
{
|
||||||
_isCsEnabledForSession?.TrySetValue(value);
|
_isCsEnabledForSession?.TrySetValue(value);
|
||||||
if (_isCsEnabledForSession != null) { ConfigService.SaveConfigValue(_isCsEnabledForSession); }
|
if (_isCsEnabledForSession != null)
|
||||||
|
{
|
||||||
|
if (_isCsEnabledForSession.GetConfigInfo() == null)
|
||||||
|
{
|
||||||
|
Logger.LogError($"Config info was nil while trying to save {IsCsEnabledForSession}");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ConfigService.SaveConfigValue(_isCsEnabledForSession);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user