diff options
author | fiaxh <git@lightrise.org> | 2023-10-07 16:53:37 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2023-10-07 16:54:09 +0200 |
commit | 8cb195a2749b0335c8d5fefc2d4fb78023cffe71 (patch) | |
tree | df92e8df02e48bae8b5be1e812d526212f16cf27 /plugins | |
parent | 1e167eeea67f18f3d5788dc34d97d94e6f401499 (diff) | |
download | dino-8cb195a2749b0335c8d5fefc2d4fb78023cffe71.tar.gz dino-8cb195a2749b0335c8d5fefc2d4fb78023cffe71.zip |
Fix crash due to gpg binding issue
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/openpgp/src/account_settings_entry.vala | 6 | ||||
-rw-r--r-- | plugins/openpgp/src/gpgme_helper.vala | 1 | ||||
-rw-r--r-- | plugins/openpgp/vapi/gpgme.vapi | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/plugins/openpgp/src/account_settings_entry.vala b/plugins/openpgp/src/account_settings_entry.vala index d2e5ac23..7c99942f 100644 --- a/plugins/openpgp/src/account_settings_entry.vala +++ b/plugins/openpgp/src/account_settings_entry.vala @@ -116,8 +116,10 @@ public class AccountSettingsEntry : Plugins.AccountSettingsEntry { SourceFunc callback = fetch_keys.callback; new Thread<void*> (null, () => { // Querying GnuPG might take some time try { - keys = GPGHelper.get_keylist(null, true); - } catch (Error e) { } + keys = GPGHelper.get_keylist(null, true); + } catch (Error e) { + warning(e.message); + } Idle.add((owned)callback); return null; }); diff --git a/plugins/openpgp/src/gpgme_helper.vala b/plugins/openpgp/src/gpgme_helper.vala index f28bc6d6..18d07c06 100644 --- a/plugins/openpgp/src/gpgme_helper.vala +++ b/plugins/openpgp/src/gpgme_helper.vala @@ -117,6 +117,7 @@ public static Gee.List<Key> get_keylist(string? pattern = null, bool secret_only } catch (Error e) { if (e.code != GPGError.ErrorCode.EOF) throw e; } + context.op_keylist_end(); return keys; } finally { global_mutex.unlock(); diff --git a/plugins/openpgp/vapi/gpgme.vapi b/plugins/openpgp/vapi/gpgme.vapi index 10fdb89d..2fc27c65 100644 --- a/plugins/openpgp/vapi/gpgme.vapi +++ b/plugins/openpgp/vapi/gpgme.vapi @@ -38,7 +38,7 @@ namespace GPG { } [Compact] - [CCode (cname = "struct _gpgme_key", ref_function = "gpgme_key_ref", ref_function_void = true, unref_function = "gpgme_key_unref", free_function = "gpgme_key_release")] + [CCode (cname = "struct _gpgme_key", ref_function = "gpgme_key_ref_vapi", unref_function = "gpgme_key_unref_vapi", free_function = "gpgme_key_release")] public class Key { public bool revoked; public bool expired; |