Skip to content

Commit

Permalink
another crash with null launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Jun 26, 2021
1 parent dc44d73 commit c7a44a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/co/tinode/tindroid/SignUpFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,

// Get avatar from the gallery or photo camera.
fragment.findViewById(R.id.uploadAvatar).setOnClickListener(v -> {
if (activity.isFinishing() || activity.isDestroyed()) {
return;
Intent launcher = UiUtils.avatarSelectorIntent(getActivity(), mRequestAvatarPermissionsLauncher);
if (launcher != null) {
mAvatarPickerLauncher.launch(launcher);
}
mAvatarPickerLauncher.launch(UiUtils.avatarSelectorIntent(getActivity(), mRequestAvatarPermissionsLauncher));
});
// Handle click on the sign up button.
fragment.findViewById(R.id.signUp).setOnClickListener(this);
Expand Down

0 comments on commit c7a44a8

Please sign in to comment.