diff options
Diffstat (limited to 'ossl_cipher.c')
-rw-r--r-- | ossl_cipher.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ossl_cipher.c b/ossl_cipher.c index 181d657..8c3fe92 100644 --- a/ossl_cipher.c +++ b/ossl_cipher.c @@ -13,13 +13,16 @@ #define MakeCipher(obj, klass, ciphp) obj = Data_Make_Struct(klass, ossl_cipher, 0, ossl_cipher_free, ciphp) #define GetCipher(obj, ciphp) do { \ Data_Get_Struct(obj, ossl_cipher, ciphp); \ - if (!ciphp || !ciphp->cipher) { \ + if (!ciphp) { \ rb_raise(rb_eRuntimeError, "Cipher not inititalized!"); \ } \ } while (0) #define SafeGetCipher(obj, ciphp) do { \ OSSL_Check_Kind(obj, cCipher); \ GetCipher(obj, ciphp); \ + if (!ciphp->cipher) { \ + rb_raise(rb_eRuntimeError, "Cipher not inititalized!"); \ + } \ } while (0) /* |