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

issue/3154-login-site-address-crash-fix #3203

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

anitaa1990
Copy link
Contributor

Fixes #3154 by adding a null check when user enters a site address during login. I haven't been able to reproduce the issue but it looks like we set the mSiteAddressInput=null when the fragment is destroyed. So if the onTextChanged is called before the mSiteAddressInput could be initialised again, this crash could potentially happen.

Given that we needn't update the mSiteAddressInput field after the fragment is destroyed, it seemed enough to do just a null check here to ensure that this crash doesn't happen again.

Update release notes:

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

@anitaa1990 anitaa1990 added Login type: crash The worst kind of bug. labels Nov 25, 2020
@anitaa1990 anitaa1990 added this to the 5.6 milestone Nov 25, 2020
@anitaa1990 anitaa1990 requested a review from a team November 25, 2020 12:18
@anitaa1990 anitaa1990 added this to In Review in Continuous Improvements via automation Nov 25, 2020
@peril-woocommerce
Copy link

Messages
📖

This PR contains changes in the subtree libs/login/. It is your responsibility to ensure these changes are merged back into wordpress-mobile/WordPress-Login-Flow-Android. Follow these handy steps!
WARNING: Make sure your git version is 2.19.x or lower - there is currently a bug in later versions that will corrupt the subtree history!

  1. cd woocommerce-android
  2. git checkout issue/3154-login-site-address-crash-fix
  3. git subtree push --prefix=libs/login/ https://github.com/wordpress-mobile/WordPress-Login-Flow-Android.git merge/woocommerce-android/3203
  4. Browse to https://github.com/wordpress-mobile/WordPress-Login-Flow-Android/pull/new/merge/woocommerce-android/3203 and open a new PR.

Generated by 🚫 dangerJS

@peril-woocommerce
Copy link

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

@shiki shiki requested review from a team and removed request for a team November 25, 2020 13:31
@AmandaRiu AmandaRiu self-assigned this Nov 25, 2020
Copy link
Contributor

@AmandaRiu AmandaRiu left a comment

Choose a reason for hiding this comment

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

Looks good @anitaa1990. Thank you for taking care of this. :shipit:

@AmandaRiu AmandaRiu merged commit 77e044e into develop Nov 25, 2020
Continuous Improvements automation moved this from In Review to Done Nov 25, 2020
@AmandaRiu AmandaRiu deleted the issue/3154-login-site-address-crash-fix branch November 25, 2020 16:50
@designsimply designsimply added feature: login Related to any part of the log in or sign in flow, or authentication. and removed Login labels May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: login Related to any part of the log in or sign in flow, or authentication. type: crash The worst kind of bug.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

NullPointerException: Attempt to invoke virtual method on a null object reference
3 participants