aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2026-01-29 17:08:46 +0100
committerfiaxh <git@lightrise.org>2026-01-29 17:08:46 +0100
commite0254904da928290d6d510a10dbfdfd2a42250f9 (patch)
tree7fd8e4bc6ca9ffd353ac148e65599d480884eda5
parenta3d96a8c34cb4442a633843f22bc27c1b6dce9f7 (diff)
Fix critical related to FileContentType
-rw-r--r--plugins/openpgp/src/file_transfer/file_decryptor.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/openpgp/src/file_transfer/file_decryptor.vala b/plugins/openpgp/src/file_transfer/file_decryptor.vala
index bc8add41..2deb5823 100644
--- a/plugins/openpgp/src/file_transfer/file_decryptor.vala
+++ b/plugins/openpgp/src/file_transfer/file_decryptor.vala
@@ -17,7 +17,8 @@ public class PgpFileDecryptor : FileDecryptor, Object {
}
public bool can_decrypt_file(Conversation conversation, FileTransfer file_transfer, FileReceiveData receive_data) {
- return file_transfer.file_name.has_suffix("pgp") || file_transfer.content_type.get_mime_type() == "application/pgp-encrypted";
+ return file_transfer.file_name.has_suffix("pgp") ||
+ (file_transfer.content_type != null && file_transfer.content_type.get_mime_type() == "application/pgp-encrypted");
}
public async InputStream decrypt_file(InputStream encrypted_stream, Conversation conversation, FileTransfer file_transfer, FileReceiveData receive_data) throws FileReceiveError {