Init before creating ex indexes
This commit is contained in:
parent
0408f75b17
commit
5c2410c38a
|
|
@ -797,6 +797,7 @@ impl SslContext {
|
||||||
T: 'static + Sync + Send
|
T: 'static + Sync + Send
|
||||||
{
|
{
|
||||||
unsafe {
|
unsafe {
|
||||||
|
ffi::init();
|
||||||
let idx = try!(cvt_n(compat::get_new_idx(free_data_box::<T>)));
|
let idx = try!(cvt_n(compat::get_new_idx(free_data_box::<T>)));
|
||||||
Ok(Index::from_raw(idx))
|
Ok(Index::from_raw(idx))
|
||||||
}
|
}
|
||||||
|
|
@ -1025,7 +1026,8 @@ impl Ssl {
|
||||||
T: 'static + Sync + Send
|
T: 'static + Sync + Send
|
||||||
{
|
{
|
||||||
unsafe {
|
unsafe {
|
||||||
let idx = try!(cvt_n(compat::get_new_ssl_idx(free_data_box::<T>)));
|
ffi::init();
|
||||||
|
let idx = try!(cvt_n(compat::get_new_ssl_idx(free_data_box::<T>)));
|
||||||
Ok(Index::from_raw(idx))
|
Ok(Index::from_raw(idx))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue