Merge pull request #4726 from nextcloud/npeNote

NPE in setting note
This commit is contained in:
Tobias Kaminsky authored and GitHub committed 2019-10-24 10:00:36 +02:00
commit 9eb77178e8
1 file changed
+7 -2
@@ -136,8 +136,13 @@ public class NoteDialogFragment extends DialogFragment implements DialogInterfac
ComponentsGetter componentsGetter = (ComponentsGetter) getActivity();
if (componentsGetter != null) {
componentsGetter.getFileOperationsHelper().updateNoteToShare(share,
noteEditText.getText().toString().trim());
String note = "";
if (noteEditText.getText() != null) {
note = noteEditText.getText().toString().trim();
}
componentsGetter.getFileOperationsHelper().updateNoteToShare(share, note);
} else {
DisplayUtils.showSnackMessage(requireActivity(), R.string.note_could_not_sent);
}