diff --git a/src/ncrypto.cpp b/src/ncrypto.cpp index e935eb8..50bd9c0 100644 --- a/src/ncrypto.cpp +++ b/src/ncrypto.cpp @@ -1515,6 +1515,7 @@ BIOPointer BIOPointer::NewSecMem() { } BIOPointer BIOPointer::New(const BIO_METHOD* method) { + if (method == nullptr) return {}; return BIOPointer(BIO_new(method)); }