Skip to content

Commit

Permalink
Fix crash when trying to Rename but nothing is checked on the list
Browse files Browse the repository at this point in the history
  • Loading branch information
Klocman committed Mar 4, 2023
1 parent be95b88 commit b9f06b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/BulkCrapUninstaller/Forms/Windows/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,13 +1007,14 @@ private void ReloadUninstallers(object sender, EventArgs e)

private void RenameEntries(object sender, EventArgs eventArgs)
{
if (_listView.SelectedUninstallerCount != 1)
var selectedUninstallers = _listView.SelectedUninstallers.ToList();
if (selectedUninstallers.Count != 1)
{
MessageBoxes.CanSelectOnlyOneItemInfo();
return;
}

var selected = _listView.SelectedUninstallers.First();
var selected = selectedUninstallers[0];

if (!_setMan.Selected.Settings.AdvancedDisableProtection && selected.IsProtected)
{
Expand Down

0 comments on commit b9f06b5

Please sign in to comment.