Skip to content

Commit

Permalink
Fix: Fixed ArgumentOutOfRangeException in DirectoryPropertiesViewModel (
Browse files Browse the repository at this point in the history
  • Loading branch information
hishitetsu authored Jun 25, 2023
1 parent ee5213e commit 9e2a707
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Files.App/Data/Models/DirectoryPropertiesViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down

0 comments on commit 9e2a707

Please sign in to comment.