1 Commits
Author SHA1 Message Date
BlubbFish 0231d800ef Check if requests not null 2020-01-20 14:27:35 +01:00
+1 -1
View File
@@ -75,7 +75,7 @@ namespace BlubbFish.Utils.IoT.Bots {
return true; return true;
} else { } else {
String file = File.ReadAllText(folder + "/" + restr); String file = File.ReadAllText(folder + "/" + restr);
if(requests.GetSections(false).Contains(restr)) { if(requests != null && requests.GetSections(false).Contains(restr)) {
Dictionary<String, String> vars = requests.GetSection(restr); Dictionary<String, String> vars = requests.GetSection(restr);
foreach(KeyValuePair<String, String> item in vars) { foreach(KeyValuePair<String, String> item in vars) {
file = file.Replace("\"{%" + item.Key.ToUpper() + "%}\"", item.Value); file = file.Replace("\"{%" + item.Key.ToUpper() + "%}\"", item.Value);