diff --git a/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/editcustomerprofilebottomsheet/EditCustomerProfileBottomSheet.java b/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/editcustomerprofilebottomsheet/EditCustomerProfileBottomSheet.java index 77ee5c9c..8336f95b 100644 --- a/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/editcustomerprofilebottomsheet/EditCustomerProfileBottomSheet.java +++ b/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/editcustomerprofilebottomsheet/EditCustomerProfileBottomSheet.java @@ -286,7 +286,11 @@ void onCancel() { @OnClick(R.id.btn_upload_photo) void uploadPhoto() { if (editAction == EditAction.CAMERA || editAction == EditAction.GALLERY) { - editCustomerProfilePresenter.uploadCustomerPortrait(customerIdentifier, file); + if (file != null) { + editCustomerProfilePresenter.uploadCustomerPortrait(customerIdentifier, file); + } else { + Toaster.show(rootView, getString(R.string.no_file_selected_yet)); + } } else if (editAction == EditAction.DELETE) { editCustomerProfilePresenter.deleteCustomerPortrait(customerIdentifier); }