Require non-null uri in UriAttachment.

Part of an effort to track down a different crash. This should make it
more obvious where the error is being made.
main
Greyson Parrelli 2023-01-04 10:09:39 -05:00
rodzic a04590b658
commit ece087eaae
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -10,6 +10,8 @@ import org.thoughtcrime.securesms.blurhash.BlurHash;
import org.thoughtcrime.securesms.database.AttachmentTable.TransformProperties;
import org.thoughtcrime.securesms.stickers.StickerLocator;
import java.util.Objects;
public class UriAttachment extends Attachment {
private final @NonNull Uri dataUri;
@ -51,7 +53,7 @@ public class UriAttachment extends Attachment {
@Nullable TransformProperties transformProperties)
{
super(contentType, transferState, size, fileName, 0, null, null, null, null, fastPreflightId, voiceNote, borderless, videoGif, width, height, quote, 0, caption, stickerLocator, blurHash, audioHash, transformProperties);
this.dataUri = dataUri;
this.dataUri = Objects.requireNonNull(dataUri);
}
@Override