Skip to content

Commit

Permalink
fix: stat may be null in Lagrange's heartbeat message
Browse files Browse the repository at this point in the history
  • Loading branch information
moonheart committed Dec 6, 2023
1 parent 1993ac0 commit 7a6e5a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/EleCho.GoCqHttpSdk/DataStructure/CqStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/// <summary>
/// 程序初始化完成
/// </summary>
Expand Down Expand Up @@ -52,7 +52,6 @@ internal CqStatus(CqStatusModel model)
/// </summary>
public bool Good { get; }


/// <summary>
/// 统计信息
/// </summary>
Expand Down

0 comments on commit 7a6e5a9

Please sign in to comment.