diff --git a/vendored/WordPressLoginFlow/src/main/java/org/wordpress/android/login/SignupEmailFragment.java b/vendored/WordPressLoginFlow/src/main/java/org/wordpress/android/login/SignupEmailFragment.java index 30318c58474a..ad667dfcf5e3 100644 --- a/vendored/WordPressLoginFlow/src/main/java/org/wordpress/android/login/SignupEmailFragment.java +++ b/vendored/WordPressLoginFlow/src/main/java/org/wordpress/android/login/SignupEmailFragment.java @@ -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());