From ee5a2a6ca8fa28ba3c3e010a96e40630b01a8f33 Mon Sep 17 00:00:00 2001 From: Hannele Ruiz Date: Sat, 16 Dec 2023 02:49:45 -0300 Subject: [PATCH] Don't do anything if there are no items Fixes #137 --- LemonUI/Menus/NativeListItem{T}.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LemonUI/Menus/NativeListItem{T}.cs b/LemonUI/Menus/NativeListItem{T}.cs index ee2a11d..7c5d3b7 100644 --- a/LemonUI/Menus/NativeListItem{T}.cs +++ b/LemonUI/Menus/NativeListItem{T}.cs @@ -73,7 +73,7 @@ public T SelectedItem { if (Items.Count == 0) { - throw new InvalidOperationException("There are no available items."); + return; } int newIndex = Items.IndexOf(value);