fix dereferenced null variable
This commit is contained in:
parent
c1305c3712
commit
6ca07b02de
1 changed files with 2 additions and 2 deletions
|
@ -23,8 +23,8 @@ internal class CustomTreeView : TreeView
|
||||||
|
|
||||||
public int Compare(object a, object b)
|
public int Compare(object a, object b)
|
||||||
{
|
{
|
||||||
TreeNode NodeA = a as TreeNode;
|
if (a is not TreeNode NodeA) return 0;
|
||||||
TreeNode NodeB = b as TreeNode;
|
if (b is not TreeNode NodeB) return 0;
|
||||||
string StringA = compareText ? NodeA.Text : NodeA.Name;
|
string StringA = compareText ? NodeA.Text : NodeA.Name;
|
||||||
string StringB = compareText ? NodeB.Text : NodeB.Name;
|
string StringB = compareText ? NodeB.Text : NodeB.Name;
|
||||||
return AppIdComparer.Comparer.Compare(StringA, StringB);
|
return AppIdComparer.Comparer.Compare(StringA, StringB);
|
||||||
|
|
Loading…
Reference in a new issue