Ver código fonte

Fixed AllViewsTester.cs crash

Ross Ferguson 5 anos atrás
pai
commit
f3b1b07540
1 arquivos alterados com 1 adições e 1 exclusões
  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);
 		}
 	}
 }