mirror of
https://github.com/profanity-im/profanity.git
synced 2024-10-13 20:13:38 -04:00
Add NULL check to _gpgme_key_to_ProfPGPKey
Fix https://github.com/profanity-im/profanity/issues/1995 Tested-by: Martin Dosch <martin@mdosch.de>
This commit is contained in:
parent
3b19a6afcd
commit
0995b1a180
@ -860,7 +860,8 @@ out:
|
|||||||
static ProfPGPKey*
|
static ProfPGPKey*
|
||||||
_gpgme_key_to_ProfPGPKey(gpgme_key_t key)
|
_gpgme_key_to_ProfPGPKey(gpgme_key_t key)
|
||||||
{
|
{
|
||||||
if (key == NULL) {
|
if (key == NULL || key->uids == NULL
|
||||||
|
|| key->subkeys == NULL || key->uids->uid == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user