Browse Source

Fixed AllViewsTester.cs crash

Ross Ferguson 5 years ago
parent
commit
a869b9c6dd
1 changed files with 1 additions and 1 deletions
  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);
 		}
 	}
 }