From 0231d800ef46b13fd9b3466e3ef5e79689b24c0a Mon Sep 17 00:00:00 2001 From: Philip Schell Date: Mon, 20 Jan 2020 14:27:35 +0100 Subject: [PATCH] Check if requests not null --- Bot-Utils/Webserver.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bot-Utils/Webserver.cs b/Bot-Utils/Webserver.cs index 7851945..295cd90 100644 --- a/Bot-Utils/Webserver.cs +++ b/Bot-Utils/Webserver.cs @@ -75,7 +75,7 @@ namespace BlubbFish.Utils.IoT.Bots { return true; } else { String file = File.ReadAllText(folder + "/" + restr); - if(requests.GetSections(false).Contains(restr)) { + if(requests != null && requests.GetSections(false).Contains(restr)) { Dictionary vars = requests.GetSection(restr); foreach(KeyValuePair item in vars) { file = file.Replace("\"{%" + item.Key.ToUpper() + "%}\"", item.Value);