diff --git a/Sources/Persistance/Persistance.cs b/Sources/Persistance/Persistance.cs index 7e8607a..37ec0ff 100644 --- a/Sources/Persistance/Persistance.cs +++ b/Sources/Persistance/Persistance.cs @@ -40,7 +40,7 @@ namespace StimPersistance if (File.Exists("games.xml")) { DataContractSerializer serializer = new(typeof(ObservableCollection)); - using (Stream stream = File.OpenRead("games.xml")) return serializer.ReadObject(stream) as ObservableCollection; + using (Stream stream = File.OpenRead("games.xml")) return serializer.ReadObject(stream) as ObservableCollection ?? new(); } return new(); } @@ -50,7 +50,7 @@ namespace StimPersistance if (File.Exists("users.xml")) { DataContractSerializer serializer = new(typeof(HashSet)); - using (Stream stream = File.OpenRead("users.xml")) return serializer.ReadObject(stream) as HashSet; + using (Stream stream = File.OpenRead("users.xml")) return serializer.ReadObject(stream) as HashSet ?? new(); } return new(); } diff --git a/Sources/Stim/Create.xaml b/Sources/Stim/Create.xaml index a5cf034..a267e1b 100644 --- a/Sources/Stim/Create.xaml +++ b/Sources/Stim/Create.xaml @@ -34,9 +34,9 @@ - + - + @@ -46,6 +46,8 @@