NPE in setting note

Signed-off-by: tobiasKaminsky <[email protected]>
This commit is contained in:
tobiasKaminsky committed 2019-10-24 08:47:11 +02:00
1 parent 71bb3124f4
commit ccd6dfaec0
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);
}