Skip to content

Do not refresh site details when view not initialized#10855

Merged
develric merged 1 commit intodevelopfrom
fix/do_not_refresh_site_details_when_view_not_initialized
Nov 27, 2019
Merged

Do not refresh site details when view not initialized#10855
develric merged 1 commit intodevelopfrom
fix/do_not_refresh_site_details_when_view_not_initialized

Conversation

@planarvoid
Copy link
Copy Markdown
Contributor

Fixes #10854

OnSiteChanged is probably called before onCreateView is triggered and that causes the views to not be initialized. I've added a check to see if the fragment.getView() is not null before we continue with the event processing. This should fix this crash.

To test:

  • I don't know how to reproduce this crash

PR submission checklist:

  • I have considered adding unit tests where possible.

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@planarvoid planarvoid added this to the 13.8 milestone Nov 26, 2019
@planarvoid planarvoid requested a review from develric November 26, 2019 15:24
@planarvoid planarvoid self-assigned this Nov 26, 2019
@peril-wordpress-mobile
Copy link
Copy Markdown

You can test the changes on this Pull Request by downloading the APK here.

Copy link
Copy Markdown
Contributor

@develric develric left a comment

Choose a reason for hiding this comment

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

Hi @planarvoid, your analysis seems solid. I also don't know how to test/prove it but the modification seems safe and should make the trick, so :shipit: !

@develric develric merged commit de3091d into develop Nov 27, 2019
@develric develric deleted the fix/do_not_refresh_site_details_when_view_not_initialized branch November 27, 2019 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash: NPE in toggleDomainRegistrationCtaVisibility in MySiteFragment

2 participants