|
@@ -206,7 +206,7 @@ namespace Terminal.Gui {
|
|
public int SelectedItem {
|
|
public int SelectedItem {
|
|
get => selected;
|
|
get => selected;
|
|
set {
|
|
set {
|
|
- if (source == null)
|
|
|
|
|
|
+ if (source == null || source.Count == 0)
|
|
return;
|
|
return;
|
|
if (selected < 0 || selected >= source.Count)
|
|
if (selected < 0 || selected >= source.Count)
|
|
throw new ArgumentException ("value");
|
|
throw new ArgumentException ("value");
|