Skip to content

Commit 68cc6c4

Browse files
committed
Fix delete index out of bound issue
1 parent 434b409 commit 68cc6c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public string Language
4141
public int CustomExplorerIndex { get; set; } = 0;
4242
public CustomExplorerViewModel CustomExplorer
4343
{
44-
get => CustomExplorerList[CustomExplorerIndex];
44+
get => CustomExplorerList[CustomExplorerIndex < CustomExplorerList.Count ? CustomExplorerIndex : 0];
4545
set => CustomExplorerList[CustomExplorerIndex] = value;
4646
}
4747

@@ -68,7 +68,7 @@ public CustomExplorerViewModel CustomExplorer
6868
Path = @"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe",
6969
DirectoryArgument = "/cmd Go \"%d\"",
7070
FileArgument = "/cmd Go \"%f\""
71-
71+
7272
},
7373
new()
7474
{

0 commit comments

Comments
 (0)