aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-02-23 16:01:10 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-02-23 16:01:10 +0100
commit68542f037aac21a167929449242054877f6f6d96 (patch)
treedb8ca95fab58d55b3ccb19fe10021c7d63c56ec8 /src
parentd147200c02a719ed8cfab12a2ffe16c99a4c65a5 (diff)
parente04288f812bc825433f19de3b64959a2354378f0 (diff)
downloadglutin-68542f037aac21a167929449242054877f6f6d96.tar.gz
glutin-68542f037aac21a167929449242054877f6f6d96.zip
Merge pull request #297 from tomaka/tomaka-patch-2
Do not call wglShareLists is ctxt is null
Diffstat (limited to 'src')
-rw-r--r--src/win32/init.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/win32/init.rs b/src/win32/init.rs
index 11a5e9f..d468820 100644
--- a/src/win32/init.rs
+++ b/src/win32/init.rs
@@ -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