From 0ca44928e315277765fd84d7f72694c9ce421781 Mon Sep 17 00:00:00 2001 From: hishitetsu <66369541+hishitetsu@users.noreply.github.com> Date: Sat, 24 Jun 2023 21:09:52 +0900 Subject: [PATCH] Update DirectoryPropertiesViewModel.cs --- src/Files.App/Data/Models/DirectoryPropertiesViewModel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Files.App/Data/Models/DirectoryPropertiesViewModel.cs b/src/Files.App/Data/Models/DirectoryPropertiesViewModel.cs index 1f8aef4ab6a2..1daab4dcecc7 100644 --- a/src/Files.App/Data/Models/DirectoryPropertiesViewModel.cs +++ b/src/Files.App/Data/Models/DirectoryPropertiesViewModel.cs @@ -38,7 +38,8 @@ public int SelectedBranchIndex { if (SetProperty(ref _SelectedBranchIndex, value) && value != -1 && - (value != ACTIVE_BRANCH_INDEX || !_ShowLocals)) + (value != ACTIVE_BRANCH_INDEX || !_ShowLocals) && + value < BranchesNames.Count) { CheckoutRequested?.Invoke(this, BranchesNames[value]); }