Fix crash due to gpg binding issue
This commit is contained in:
parent
1e167eeea6
commit
8cb195a274
|
@ -116,8 +116,10 @@ public class AccountSettingsEntry : Plugins.AccountSettingsEntry {
|
||||||
SourceFunc callback = fetch_keys.callback;
|
SourceFunc callback = fetch_keys.callback;
|
||||||
new Thread<void*> (null, () => { // Querying GnuPG might take some time
|
new Thread<void*> (null, () => { // Querying GnuPG might take some time
|
||||||
try {
|
try {
|
||||||
keys = GPGHelper.get_keylist(null, true);
|
keys = GPGHelper.get_keylist(null, true);
|
||||||
} catch (Error e) { }
|
} catch (Error e) {
|
||||||
|
warning(e.message);
|
||||||
|
}
|
||||||
Idle.add((owned)callback);
|
Idle.add((owned)callback);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|
|
@ -117,6 +117,7 @@ public static Gee.List<Key> get_keylist(string? pattern = null, bool secret_only
|
||||||
} catch (Error e) {
|
} catch (Error e) {
|
||||||
if (e.code != GPGError.ErrorCode.EOF) throw e;
|
if (e.code != GPGError.ErrorCode.EOF) throw e;
|
||||||
}
|
}
|
||||||
|
context.op_keylist_end();
|
||||||
return keys;
|
return keys;
|
||||||
} finally {
|
} finally {
|
||||||
global_mutex.unlock();
|
global_mutex.unlock();
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace GPG {
|
||||||
}
|
}
|
||||||
|
|
||||||
[Compact]
|
[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 class Key {
|
||||||
public bool revoked;
|
public bool revoked;
|
||||||
public bool expired;
|
public bool expired;
|
||||||
|
|
Loading…
Reference in a new issue