diff --git a/Pilz/Data/Json/JsonFileContainer.cs b/Pilz/Data/Json/JsonFileContainer.cs index c8b5abf..06fdac7 100644 --- a/Pilz/Data/Json/JsonFileContainer.cs +++ b/Pilz/Data/Json/JsonFileContainer.cs @@ -8,8 +8,11 @@ public class JsonFileContainer(string filePath) : JsonDataContainer { lock (_lock_FileAction) { - using var sw = new StreamReader(filePath); - GetSerializer().Populate(sw, this); + if (File.Exists(filePath)) + { + using var sw = new StreamReader(filePath); + GetSerializer().Populate(sw, this); + } } }