mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Fix potential crash when backing up attachment.
This commit is contained in:
@@ -121,6 +121,11 @@ class UploadAttachmentToArchiveJob private constructor(
|
||||
return Result.failure()
|
||||
}
|
||||
|
||||
if (attachment.uri == null) {
|
||||
Log.w(TAG, "[$attachmentId] Attachment has no uri! Cannot upload.")
|
||||
return Result.failure()
|
||||
}
|
||||
|
||||
if (attachment.archiveTransferState == AttachmentTable.ArchiveTransferState.FINISHED) {
|
||||
Log.i(TAG, "[$attachmentId] Already finished. Skipping.")
|
||||
return Result.success()
|
||||
|
||||
Reference in New Issue
Block a user