Merge pull request #448 from Deali-Axy/master

修复一个空指针异常的逻辑错误
This commit is contained in:
辉鸭蛋 2022-10-13 11:19:24 +08:00 committed by GitHub
commit d2f08dddbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
using RevokeMsgPatcher.Model;
using RevokeMsgPatcher.Modifier;
using RevokeMsgPatcher.Utils;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@ -147,7 +148,11 @@ namespace RevokeMsgPatcher
}
// b.获取选择的功能 精准匹配返回null // TODO 此处逻辑可以优化 不可完全信任UI信息
List<string> categories = UIController.GetCategoriesFromPanel(panelCategories);
if (categories != null && categories.Count == 0)
// DealiAxy: 修复一个空指针异常的逻辑错误
if (categories != null)
{
if (categories.Count == 0)
{
MessageBox.Show("请至少选择一项功能");
EnableAllButton(true);
@ -172,6 +177,7 @@ namespace RevokeMsgPatcher
return;
}
}
}
// c.计算SHA1验证文件完整性寻找对应的补丁信息精确版本、通用特征码两种补丁信息
try