diff --git a/VirtualListView/PositionalViewSelector.cs b/VirtualListView/PositionalViewSelector.cs index 8b93b4a..198bb9c 100644 --- a/VirtualListView/PositionalViewSelector.cs +++ b/VirtualListView/PositionalViewSelector.cs @@ -26,6 +26,11 @@ public int TotalCount int GetTotalCount() { + if (Adapter is null) + { + return 0; + } + var sum = 0; var hasAtLeastOneItem = false;