Description: Add NULL check to _gpgme_key_to_ProfPGPKey 
Author: Michael Vetter <jubalh@iodoru.org>
Origin: upstream, https://github.com/profanity-im/profanity/commit/0995b1a180e24ebc0383621d3d5bfaff98e1f877
Bug: https://github.com/profanity-im/profanity/issues/1995
Applied-Upstream: URL, https://github.com/profanity-im/profanity/commit/0995b1a180e24ebc0383621d3d5bfaff98e1f877
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/pgp/gpg.c
+++ b/src/pgp/gpg.c
@@ -889,7 +889,8 @@
 static ProfPGPKey*
 _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;
     }
 
