diff options
author | Tomaka17 <pierre.krieger1708@gmail.com> | 2014-08-03 17:33:48 +0200 |
---|---|---|
committer | Tomaka17 <pierre.krieger1708@gmail.com> | 2014-08-03 17:33:48 +0200 |
commit | d574f6f1bbcdcc93649fe9daa18106a3cae61ef6 (patch) | |
tree | 9872b77c95dca13b4ffb0dd78f6db903f3666295 /src/win32 | |
parent | 3c9565ad25d1bd86e307964811ceaef5de9c1324 (diff) | |
download | glutin-d574f6f1bbcdcc93649fe9daa18106a3cae61ef6.tar.gz glutin-d574f6f1bbcdcc93649fe9daa18106a3cae61ef6.zip |
Fix GL context not being destroyed on win32
Diffstat (limited to 'src/win32')
-rw-r--r-- | src/win32/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/win32/mod.rs b/src/win32/mod.rs index dbcbd8a..f29bf89 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -199,6 +199,9 @@ impl Window { #[unsafe_destructor] impl Drop for Window { fn drop(&mut self) { + use std::ptr; + unsafe { ffi::wglMakeCurrent(ptr::mut_null(), ptr::mut_null()); } + unsafe { ffi::wglDeleteContext(self.context); } unsafe { ffi::DestroyWindow(self.window); } } } |