From 76bd523c2313257831f9c526ca72bc9f8043d1e5 Mon Sep 17 00:00:00 2001 From: Paddy Byers Date: Fri, 18 Nov 2011 17:45:53 +0000 Subject: [PATCH] Fix crypto statics initialisation --- src/node_crypto.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 6ef9bbf047d..ca32e050c9e 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -151,7 +151,7 @@ static unsigned long crypto_id_cb(void) { void SecureContext::Initialize(Handle target) { HandleScope scope; - NODE_STATICS_NEW(node_crypto, CryptoStatics, statics); + CryptoStatics *statics = NODE_STATICS_GET(node_crypto, CryptoStatics); Local t = FunctionTemplate::New(SecureContext::New); statics->secure_context_constructor = Persistent::New(t); @@ -4266,7 +4266,7 @@ Handle RandomBytes(const Arguments& args) { void InitCrypto(Handle target) { HandleScope scope; - CryptoStatics *statics = NODE_STATICS_GET(node_crypto, CryptoStatics); + NODE_STATICS_NEW(node_crypto, CryptoStatics, statics); SSL_library_init(); OpenSSL_add_all_algorithms();