Skip to content

Commit

Permalink
Add additional guards to UnionSelection method
Browse files Browse the repository at this point in the history
  • Loading branch information
tznind committed Dec 30, 2022
1 parent 8dd77f2 commit c3cebbd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Terminal.Gui/Views/TableView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -769,9 +769,11 @@ public void SetSelection (int col, int row, bool extendExistingSelection)
/// <param name="row"></param>
private void UnionSelection (int col, int row)
{
if(!MultiSelect) {
if (!MultiSelect || TableIsNullOrInvisible()) {
return;
}

EnsureValidSelection ();

var oldColumn = SelectedColumn;
var oldRow = SelectedRow;
Expand Down

0 comments on commit c3cebbd

Please sign in to comment.