Do not include the removed file status-table.h
[gpgme.git] / src / decrypt.c
index c017b90733b6da3445d02ff5853c58583f26f9c0..43945ec34a600c378016fe0458ea7e32a833f6ed 100644 (file)
@@ -31,7 +31,6 @@
 #include "util.h"
 #include "context.h"
 #include "ops.h"
-#include "extra-stati.h"
 
 
 \f
@@ -375,6 +374,10 @@ gpgme_op_decrypt_start (gpgme_ctx_t ctx, gpgme_data_t cipher,
 
   TRACE_BEG2 (DEBUG_CTX, "gpgme_op_decrypt_start", ctx,
              "cipher=%p, plain=%p", cipher, plain);
+
+  if (!ctx)
+    return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE));
+  
   err = decrypt_start (ctx, 0, cipher, plain);
   return TRACE_ERR (err);
 }
@@ -389,6 +392,10 @@ gpgme_op_decrypt (gpgme_ctx_t ctx, gpgme_data_t cipher, gpgme_data_t plain)
 
   TRACE_BEG2 (DEBUG_CTX, "gpgme_op_decrypt", ctx,
              "cipher=%p, plain=%p", cipher, plain);
+
+  if (!ctx)
+    return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE));
+  
   err = decrypt_start (ctx, 1, cipher, plain);
   if (!err)
     err = _gpgme_wait_one (ctx);