fix error when config is missing

This commit is contained in:
2022-06-15 20:53:09 +03:00
parent a0d2b127de
commit 5d0b1ea27d

View File

@@ -12,6 +12,8 @@ namespace Game
public static Config ParseFile(string path)
{
Config config = new Config();
if (!File.Exists(path))
return config;
using FileStream file = File.OpenRead(path);
using StreamReader sr = new StreamReader(file);