Allow null context on gpgme_set_locale.
authorMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Fri, 27 Jul 2012 23:17:03 +0000 (01:17 +0200)
committerMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Fri, 27 Jul 2012 23:17:03 +0000 (01:17 +0200)
* gpgme.c (gpgme_set_locale): Allow CTX to be a null pointer.

src/gpgme.c

index c8e6a8b708d45fb1111579f487217d913e9f7d91..927b2a094986b6b95df9de689ce558a1283b6784 100644 (file)
@@ -639,9 +639,6 @@ gpgme_set_locale (gpgme_ctx_t ctx, int category, const char *value)
   TRACE_BEG2 (DEBUG_CTX, "gpgme_set_locale", ctx,
               "category=%i, value=%s", category, value ? value : "(null)");
 
-  if (!ctx)
-    return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE));
-
 #define PREPARE_ONE_LOCALE(lcat, ucat)                         \
   if (!failed && value                                         \
       && (category == LC_ALL || category == LC_ ## ucat))      \