修复一个空指针异常的逻辑错误

This commit is contained in:
DealiAxy 2022-10-13 10:36:21 +08:00
parent 1e44f4d0ff
commit 70898fdded

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