Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix null exception #44

Merged
merged 2 commits into from
Jun 7, 2024
Merged

Fix null exception #44

merged 2 commits into from
Jun 7, 2024

Conversation

Codelisk
Copy link
Contributor

No description provided.

@@ -30,6 +30,10 @@ int GetTotalCount()

var hasAtLeastOneItem = false;
var numberOfSections = Adapter.GetNumberOfSections();
if (Adapter is null)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems innocent enough, however it should be moved above the line of code it's under... really to the start of the method. You're checking for Adapter being null after the call to Adapter.GetNumberOfSections()...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah sounds right :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed it

@Redth Redth merged commit f8c5cda into Redth:main Jun 7, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants