1
0
Fork 1

Fix crash coming back with photo

(cherry picked from commit 27d9e2c82f59e0eec003058b93ed63f9b458b8c9)
This commit is contained in:
Stephen Paul Weber 2024-12-16 13:03:49 -05:00 committed by Arne
parent 6cfd420f8f
commit bec1acfd6d

View file

@ -1430,7 +1430,7 @@ public class ConversationFragment extends XmppFragment
break;
case ATTACHMENT_CHOICE_CHOOSE_IMAGE: {
final Uri takePhotoUri = pendingTakePhotoUri.pop();
if (takePhotoUri != null && data.getData() == null && data.getClipData() == null) {
if (takePhotoUri != null && (data == null || (data.getData() == null && data.getClipData() == null))) {
mediaPreviewAdapter.addMediaPreviews(
Attachment.of(getActivity(), takePhotoUri, Attachment.Type.IMAGE));
}