Skip to content

Commit

Permalink
Merge pull request #16 from wordpress-mobile/fix_crash_in_login_email…
Browse files Browse the repository at this point in the history
…_fragment

Adds non-null check to onActivityResult
  • Loading branch information
aforcier authored May 24, 2019
2 parents f2fade8 + 39933e4 commit 0f338da
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);

if (requestCode == EMAIL_CREDENTIALS_REQUEST_CODE) {
if (mEmailInput == null) {
// Activity result received before the fragments onCreateView(), disregard result.
return;
}
if (resultCode == RESULT_OK) {
Credential credential = data.getParcelableExtra(Credential.EXTRA_KEY);
mEmailInput.getEditText().setText(credential.getId());
Expand Down

0 comments on commit 0f338da

Please sign in to comment.