mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-24 02:46:33 +11:00
Do not call wglShareLists is ctxt is null
This commit is contained in:
parent
d147200c02
commit
e04288f812
1 changed files with 1 additions and 1 deletions
|
@ -397,7 +397,7 @@ fn create_context(extra: Option<(&gl::wgl_extra::Wgl, &BuilderAttribs<'static>)>
|
||||||
None => {
|
None => {
|
||||||
unsafe {
|
unsafe {
|
||||||
let ctxt = gl::wgl::CreateContext(hdc as *const libc::c_void);
|
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);
|
gl::wgl::ShareLists(share as *const libc::c_void, ctxt);
|
||||||
};
|
};
|
||||||
ctxt
|
ctxt
|
||||||
|
|
Loading…
Add table
Reference in a new issue