diff options
Diffstat (limited to 'src/pgp/gpg.c')
-rw-r--r-- | src/pgp/gpg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c index 051f99f0..bfebe8bd 100644 --- a/src/pgp/gpg.c +++ b/src/pgp/gpg.c @@ -1,7 +1,7 @@ /* * gpg.c * - * Copyright (C) 2012 - 2017 James Booth <boothj5@gmail.com> + * Copyright (C) 2012 - 2018 James Booth <boothj5@gmail.com> * * This file is part of Profanity. * @@ -56,7 +56,7 @@ #define PGP_MESSAGE_HEADER "-----BEGIN PGP MESSAGE-----" #define PGP_MESSAGE_FOOTER "-----END PGP MESSAGE-----" -static const char *libversion; +static const char *libversion = NULL; static GHashTable *pubkeys; static gchar *pubsloc; @@ -420,6 +420,9 @@ p_gpg_pubkeys(void) const char* p_gpg_libver(void) { + if (libversion == NULL) { + libversion = gpgme_check_version(NULL); + } return libversion; } |