diff --git a/src/win32/mod.rs b/src/win32/mod.rs index dbcbd8a0..f29bf89b 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); } } }