mirror of
https://github.com/isledecomp/LEGOIslandRebuilder.git
synced 2025-02-17 08:30:56 -05:00
ignore invalid xml config
This commit is contained in:
parent
0111d3f3f3
commit
f23f9e6aca
1 changed files with 9 additions and 5 deletions
|
@ -743,11 +743,15 @@ namespace Rebuilder
|
|||
// Load patch data
|
||||
if (File.Exists(settings_path))
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(PatchList));
|
||||
TextReader reader = new StreamReader(settings_path);
|
||||
patch_config = (PatchList)serializer.Deserialize(reader);
|
||||
patch_view.SelectedObject = patch_config;
|
||||
reader.Close();
|
||||
try
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(PatchList));
|
||||
TextReader reader = new StreamReader(settings_path);
|
||||
patch_config = (PatchList)serializer.Deserialize(reader);
|
||||
patch_view.SelectedObject = patch_config;
|
||||
reader.Close();
|
||||
}
|
||||
catch (InvalidOperationException) { }
|
||||
}
|
||||
|
||||
settings_path = GetMusicSettingsPath();
|
||||
|
|
Loading…
Reference in a new issue