aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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); }
}
}