diff options
Diffstat (limited to 'src/trustlist.c')
-rw-r--r-- | src/trustlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/trustlist.c b/src/trustlist.c index 67c724fb..a96b6c72 100644 --- a/src/trustlist.c +++ b/src/trustlist.c @@ -177,7 +177,7 @@ gpgme_op_trustlist_start (gpgme_ctx_t ctx, const char *pattern, int max_level) TRACE_BEG2 (DEBUG_CTX, "gpgme_op_trustlist_start", ctx, "pattern=%s, max_level=%i", pattern, max_level); - if (!pattern || !*pattern) + if (!ctx || !pattern || !*pattern) return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); err = _gpgme_op_reset (ctx, 2); @@ -212,7 +212,7 @@ gpgme_op_trustlist_next (gpgme_ctx_t ctx, gpgme_trust_item_t *r_item) TRACE_BEG (DEBUG_CTX, "gpgme_op_trustlist_next", ctx); - if (!r_item) + if (!ctx || !r_item) return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); *r_item = NULL; if (!ctx) |