Skip to content

Commit

Permalink
Fix potential Out of range exception
Browse files Browse the repository at this point in the history
  • Loading branch information
disas69 committed Oct 28, 2021
1 parent 82efd9d commit b3a3b2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected override void AdjustSpaceElement(float size)

protected override void ReorientElement(ReorientMethod reorientMethod, int elementsCulledAbove)
{
if (ActiveElements.Count == 0)
if (ActiveElements.Count <= 1)
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected override void AdjustSpaceElement(float size)

protected override void ReorientElement(ReorientMethod reorientMethod, int elementsCulledAbove)
{
if (ActiveElements.Count == 0)
if (ActiveElements.Count <= 1)
{
return;
}
Expand Down

0 comments on commit b3a3b2b

Please sign in to comment.