From 8b6c13216a4f136f3fd48986a487cf71896dd81c Mon Sep 17 00:00:00 2001 From: Orbmu2k Date: Sun, 26 Mar 2023 11:35:33 +0200 Subject: [PATCH] possible fix for #131 --- nspector/Common/Helper/UserSettings.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nspector/Common/Helper/UserSettings.cs b/nspector/Common/Helper/UserSettings.cs index 9c60b6e..4050368 100644 --- a/nspector/Common/Helper/UserSettings.cs +++ b/nspector/Common/Helper/UserSettings.cs @@ -41,7 +41,14 @@ public static UserSettings LoadSettings() var filename = GetSettingsFilename(); if (!File.Exists(filename)) return new UserSettings(); - return XMLHelper.DeserializeFromXMLFile(GetSettingsFilename()); + try + { + return XMLHelper.DeserializeFromXMLFile(GetSettingsFilename()); + } + catch + { + return new UserSettings(); + } } } }