From 4eacfce59e99e4d841255a053ce6acdc77b0c91c Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 18 Jul 2015 18:32:02 +0200 Subject: Split creating an EGL context in two parts --- src/api/win32/init.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/api/win32') diff --git a/src/api/win32/init.rs b/src/api/win32/init.rs index cc6d2d2..fdb88c9 100644 --- a/src/api/win32/init.rs +++ b/src/api/win32/init.rs @@ -177,8 +177,8 @@ unsafe fn init(title: Vec, builder: BuilderAttribs<'static>, unsafe { kernel32::GetProcAddress(dll, name.as_ptr()) as *const libc::c_void } }); - if let Ok(c) = EglContext::new(egl, &builder, Some(ptr::null()), - real_window.0) + if let Ok(c) = EglContext::new(egl, &builder, Some(ptr::null())) + .and_then(|p| p.finish(real_window.0)) { Context::Egl(c) -- cgit v1.2.3