aboutsummaryrefslogtreecommitdiffstats
path: root/src/win32
diff options
context:
space:
mode:
authorTomaka17 <pierre.krieger1708@gmail.com>2014-08-03 17:33:48 +0200
committerTomaka17 <pierre.krieger1708@gmail.com>2014-08-03 17:33:48 +0200
commitd574f6f1bbcdcc93649fe9daa18106a3cae61ef6 (patch)
tree9872b77c95dca13b4ffb0dd78f6db903f3666295 /src/win32
parent3c9565ad25d1bd86e307964811ceaef5de9c1324 (diff)
downloadglutin-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.rs3
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); }
}
}