瀏覽代碼

Another exception fix

Adam Ierymenko 6 年之前
父節點
當前提交
72ccd1020a
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      controller/PostgreSQL.cpp

+ 4 - 1
controller/PostgreSQL.cpp

@@ -1047,7 +1047,10 @@ void PostgreSQL::commitThread()
 					if (!(*config)["remoteTraceTarget"].is_null()) {
 						remoteTraceTarget = (*config)["remoteTraceTarget"];
 					}
-					std::string rulesSource = (*config)["rulesSource"];
+					std::string rulesSource;
+					if ((*config)["rulesSource"].is_string()) {
+						rulesSource = (*config)["rulesSource"];
+					}
 					std::string caps = OSUtils::jsonDump((*config)["capabilitles"], -1);
 					std::string now = std::to_string(OSUtils::now());
 					std::string mtu = std::to_string((int)(*config)["mtu"]);