diff --git a/src/BSLManager/Tools/SettingsManager.cs b/src/BSLManager/Tools/SettingsManager.cs index db98d71..5ff6314 100644 --- a/src/BSLManager/Tools/SettingsManager.cs +++ b/src/BSLManager/Tools/SettingsManager.cs @@ -90,11 +90,18 @@ namespace BSLManager.Tools private LocalSettingsData GetLocalSettingsFile() { - if (!File.Exists(LocalFileName)) return null; + try + { + if (!File.Exists(LocalFileName)) return null; - var jsonContent = File.ReadAllText(LocalFileName); - var content = JsonConvert.DeserializeObject(jsonContent); - return content; + var jsonContent = File.ReadAllText(LocalFileName); + var content = JsonConvert.DeserializeObject(jsonContent); + return content; + } + catch (Exception) + { + return null; + } } private void SaveLocalSettings(LocalSettingsData data)