diff options
Diffstat (limited to 'core/crypto/crypto_core.cpp')
-rw-r--r-- | core/crypto/crypto_core.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/crypto/crypto_core.cpp b/core/crypto/crypto_core.cpp index 3ca2ec282f..17b34c08e2 100644 --- a/core/crypto/crypto_core.cpp +++ b/core/crypto/crypto_core.cpp @@ -73,7 +73,7 @@ Error CryptoCore::RandomGenerator::init() { } Error CryptoCore::RandomGenerator::get_random_bytes(uint8_t *r_buffer, size_t p_bytes) { - ERR_FAIL_COND_V(!ctx, ERR_UNCONFIGURED); + ERR_FAIL_NULL_V(ctx, ERR_UNCONFIGURED); int ret = mbedtls_ctr_drbg_random((mbedtls_ctr_drbg_context *)ctx, r_buffer, p_bytes); ERR_FAIL_COND_V_MSG(ret, FAILED, " failed\n ! mbedtls_ctr_drbg_seed returned an error" + itos(ret)); return OK; |