From f35d36bd6db3f460ce33eaa9382268233a1fd7c7 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Tue, 9 Nov 2021 22:56:26 -0600 Subject: [PATCH] Fix delete index out of bound issue --- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 4554dbc4f..a91489e60 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -42,7 +42,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings public int CustomExplorerIndex { get; set; } = 0; public CustomExplorerViewModel CustomExplorer { - get => CustomExplorerList[CustomExplorerIndex]; + get => CustomExplorerList[CustomExplorerIndex < CustomExplorerList.Count ? CustomExplorerIndex : 0]; set => CustomExplorerList[CustomExplorerIndex] = value; } @@ -69,7 +69,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings Path = @"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe", DirectoryArgument = "/cmd Go \"%d\"", FileArgument = "/cmd Go \"%f\"" - + }, new() {