From abf4a98837e43e542701c60b7ec6a088cd5236da Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期一, 22 二月 2021 09:10:35 +0800
Subject: [PATCH] 20210222

---
 HDL_ON/DAL/Server/HttpServerRequest.cs |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
old mode 100755
new mode 100644
index 369d632..e3bed2f
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -604,6 +604,8 @@
         /// </summary>
         public string GetGatewayInfo()
         {
+            if (DB_ResidenceData.Instance.HomeGateway == null)
+                return StateCode.NETWORK_ERROR;
             Dictionary<string, object> d = new Dictionary<string, object>();
             d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
             d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);

--
Gitblit v1.8.0