From 0c4c132ea315a1cb27f67535ec3226610e16092e Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 03 二月 2021 14:34:05 +0800
Subject: [PATCH] 0203发布版本

---
 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
index 369d632..e3bed2f 100644
--- 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