From 0102abeec1d2055b19dccbb7edc7f06e527642b1 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 29 Oct 2017 15:15:28 +0100 Subject: Fix warnings --- plugins/openpgp/src/encryption_list_entry.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/openpgp/src/encryption_list_entry.vala') diff --git a/plugins/openpgp/src/encryption_list_entry.vala b/plugins/openpgp/src/encryption_list_entry.vala index e0a11865..d2cbd13f 100644 --- a/plugins/openpgp/src/encryption_list_entry.vala +++ b/plugins/openpgp/src/encryption_list_entry.vala @@ -23,7 +23,9 @@ private class EncryptionListEntry : Plugins.EncryptionListEntry, Object { public bool can_encrypt(Entities.Conversation conversation) { if (conversation.type_ == Conversation.Type.CHAT) { string? key_id = stream_interactor.get_module(Manager.IDENTITY).get_key_id(conversation.account, conversation.counterpart); - return key_id != null && GPGHelper.get_keylist(key_id).size > 0; + try { + return key_id != null && GPGHelper.get_keylist(key_id).size > 0; + } catch (Error e) { return false; } } else if (conversation.type_ == Conversation.Type.GROUPCHAT) { Gee.List muc_jids = new Gee.ArrayList(); Gee.List? occupants = stream_interactor.get_module(MucManager.IDENTITY).get_occupants(conversation.counterpart, conversation.account); -- cgit v1.2.3-54-g00ecf