From 5d0b1ea27daff3cc2f052b7f043faa95924d4af8 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Wed, 15 Jun 2022 20:53:09 +0300 Subject: [PATCH] fix error when config is missing --- Source/Game/Console/ConfigParser.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Game/Console/ConfigParser.cs b/Source/Game/Console/ConfigParser.cs index b77d99d..adabebb 100644 --- a/Source/Game/Console/ConfigParser.cs +++ b/Source/Game/Console/ConfigParser.cs @@ -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);