Skip to content

Commit

Permalink
Checking mUsername nullability to prevent crashes
Browse files Browse the repository at this point in the history
Co-authored-by: Antonis Lilis <antonis.lilis@automattic.com>
  • Loading branch information
hamorillo and Antonis Lilis committed Jun 10, 2024
1 parent eaeee99 commit 25ceac9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -815,10 +815,10 @@ class SignupEpilogueFragment : LoginBaseFormFragment<SignupEpilogueListener?>(),
}

private fun updateUsername() {
val payload = PushUsernamePayload(
(mUsername)!!, AccountUsernameActionType.KEEP_OLD_SITE_AND_ADDRESS
)
dispatcher.dispatch(AccountActionBuilder.newPushUsernameAction(payload))
mUsername?.let {
val payload = PushUsernamePayload(it, AccountUsernameActionType.KEEP_OLD_SITE_AND_ADDRESS)
dispatcher.dispatch(AccountActionBuilder.newPushUsernameAction(payload))
}
}

private inner class DownloadAvatarAndUploadGravatarThread(
Expand Down

0 comments on commit 25ceac9

Please sign in to comment.