Browse Source

Forgot to check if the source.Count > 0.

BDisp 5 năm trước cách đây
mục cha
commit
06b4459c54
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Terminal.Gui/Views/ListView.cs

+ 1 - 1
Terminal.Gui/Views/ListView.cs

@@ -532,7 +532,7 @@ namespace Terminal.Gui {
 		///<inheritdoc/>
 		public override bool OnEnter (View view)
 		{
-			if (lastSelectedItem == -1) {
+			if (source.Count > 0 && lastSelectedItem == -1) {
 				OnSelectedChanged ();
 				return true;
 			}