Skip to content

Commit

Permalink
Merge pull request #44 from Codelisk/total-count-null-fix
Browse files Browse the repository at this point in the history
Fix null exception
  • Loading branch information
Redth authored Jun 7, 2024
2 parents 7e14967 + 12b0880 commit f8c5cda
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions VirtualListView/PositionalViewSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public int TotalCount

int GetTotalCount()
{
if (Adapter is null)
{
return 0;
}

var sum = 0;

var hasAtLeastOneItem = false;
Expand Down

0 comments on commit f8c5cda

Please sign in to comment.