* UINavBar: 修复一处索引引起的出错

This commit is contained in:
Sunny 2022-04-03 13:55:28 +08:00
parent 374f7997bb
commit 066f334b67

View File

@ -617,7 +617,8 @@ namespace Sunny.UI
if (ActiveIndex == -1) return;
SelectedIndex = ActiveIndex;
Invalidate();
if (SelectedIndex < 0) return;
if (SelectedIndex >= Nodes.Count) return;
if (Nodes[selectedIndex].Nodes.Count == 0)
{
return;