Skip to content

Commit

Permalink
fix null exception in totalcount
Browse files Browse the repository at this point in the history
  • Loading branch information
Codelisk committed May 28, 2024
1 parent e7b420a commit 90af7a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions VirtualListView/PositionalViewSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ int GetTotalCount()

var hasAtLeastOneItem = false;
var numberOfSections = Adapter.GetNumberOfSections();
if (Adapter is null)
{
return 0;
}

if (HasGlobalHeader && numberOfSections > 0)
{
Expand Down

0 comments on commit 90af7a5

Please sign in to comment.