Skip to content

Commit

Permalink
camera only back press crash issues (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
shamsshykh authored Apr 16, 2022
1 parent 742d7b3 commit 00df20c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ class ImagePickerActivity : AppCompatActivity(), ImagePickerInteractionListener
}

override fun onBackPressed() {
if (!imagePickerFragment.handleBack()) {
if (this::imagePickerFragment.isInitialized) {
if (!imagePickerFragment.handleBack()) {
super.onBackPressed()
}
}else {
super.onBackPressed()
}
}
Expand Down

0 comments on commit 00df20c

Please sign in to comment.