fix(Account): 修正Credential对象的IsEmpty()方法的cred参数为null时产生异常的问题。

This commit is contained in:
SL 2024-07-12 18:42:02 +08:00
parent c6f16187a9
commit 9b5b3f6810
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ public class Credential
/// <returns></returns> /// <returns></returns>
public static bool IsEmpty(Credential cred) public static bool IsEmpty(Credential cred)
{ {
return cred.Token == Guid.Empty; return cred is null || cred.Token == Guid.Empty;
} }
/// <inheritdoc /> /// <inheritdoc />