mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-28 15:43:13 -04:00
Do not call wglShareLists is ctxt is null
This commit is contained in:
@@ -397,7 +397,7 @@ fn create_context(extra: Option<(&gl::wgl_extra::Wgl, &BuilderAttribs<'static>)>
|
||||
None => {
|
||||
unsafe {
|
||||
let ctxt = gl::wgl::CreateContext(hdc as *const libc::c_void);
|
||||
if !share.is_null() {
|
||||
if !ctxt.is_null() && !share.is_null() {
|
||||
gl::wgl::ShareLists(share as *const libc::c_void, ctxt);
|
||||
};
|
||||
ctxt
|
||||
|
||||
Reference in New Issue
Block a user