Commit 5c2410c3 authored by Steven Fackler's avatar Steven Fackler
Browse files

Init before creating ex indexes

parent 0408f75b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -797,6 +797,7 @@ impl SslContext {
        T: 'static + Sync + Send
    {
        unsafe {
            ffi::init();
            let idx = try!(cvt_n(compat::get_new_idx(free_data_box::<T>)));
            Ok(Index::from_raw(idx))
        }
@@ -1025,6 +1026,7 @@ impl Ssl {
        T: 'static + Sync + Send
    {
        unsafe {
            ffi::init();
            let idx = try!(cvt_n(compat::get_new_ssl_idx(free_data_box::<T>)));
            Ok(Index::from_raw(idx))
        }