Browse Source

Fixed AllViewsTester.cs crash

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

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

@@ -338,7 +338,7 @@ namespace Terminal.Gui {
 		private int CalculatetHeight ()
 		{
 			var h = (Height is Dim.DimAbsolute) ? height : Bounds.Height;
-			return Math.Min (Math.Max (0, h - 1), searchset.Count);
+			return Math.Min (Math.Max (0, h - 1), searchset?.Count ?? 0);
 		}
 	}
 }