mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 05:40:04 -04:00
Fix GL context not being destroyed on win32
This commit is contained in:
@@ -199,6 +199,9 @@ impl Window {
|
|||||||
#[unsafe_destructor]
|
#[unsafe_destructor]
|
||||||
impl Drop for Window {
|
impl Drop for Window {
|
||||||
fn drop(&mut self) {
|
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); }
|
unsafe { ffi::DestroyWindow(self.window); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user