From 7a6e5a963920fbc9d2648f6d37e0c6b27896d00b Mon Sep 17 00:00:00 2001 From: moonheart Date: Wed, 6 Dec 2023 13:28:16 +0800 Subject: [PATCH] fix: stat may be null in Lagrange's heartbeat message --- src/EleCho.GoCqHttpSdk/DataStructure/CqStatus.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/EleCho.GoCqHttpSdk/DataStructure/CqStatus.cs b/src/EleCho.GoCqHttpSdk/DataStructure/CqStatus.cs index bc0fbe2..320edca 100644 --- a/src/EleCho.GoCqHttpSdk/DataStructure/CqStatus.cs +++ b/src/EleCho.GoCqHttpSdk/DataStructure/CqStatus.cs @@ -19,9 +19,9 @@ internal CqStatus(CqStatusModel model) AppGood = model.app_good; Online = model.online; Good = model.good; - Statistics = new CqStatusStatistics(model.stat); + Statistics = model.stat == null ? new CqStatusStatistics() : new CqStatusStatistics(model.stat); } - + /// /// 程序初始化完成 /// @@ -52,7 +52,6 @@ internal CqStatus(CqStatusModel model) /// public bool Good { get; } - /// /// 统计信息 ///