diff options
Diffstat (limited to 'plugins/openpgp/src/contact_details_provider.vala')
-rw-r--r-- | plugins/openpgp/src/contact_details_provider.vala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/openpgp/src/contact_details_provider.vala b/plugins/openpgp/src/contact_details_provider.vala index 5529549c..b691cc19 100644 --- a/plugins/openpgp/src/contact_details_provider.vala +++ b/plugins/openpgp/src/contact_details_provider.vala @@ -18,8 +18,11 @@ public class ContactDetailsProvider : Plugins.ContactDetailsProvider, Object { string? key_id = stream_interactor.get_module(Manager.IDENTITY).get_key_id(conversation.account, conversation.counterpart); if (key_id != null) { Label label = new Label("") { use_markup=true, justify=Justification.RIGHT, selectable=true, visible=true }; - Gee.List<GPG.Key> keys = GPGHelper.get_keylist(key_id); - if (keys.size > 0) { + Gee.List<GPG.Key>? keys = null; + try { + keys = GPGHelper.get_keylist(key_id); + } catch (Error e) { } + if (keys != null && keys.size > 0) { label.label = markup_colorize_id(keys[0].fpr, true); } else { label.label = _("Key not in keychain") + "\n" + markup_colorize_id(key_id, false); |