From d574f6f1bbcdcc93649fe9daa18106a3cae61ef6 Mon Sep 17 00:00:00 2001 From: Tomaka17 Date: Sun, 3 Aug 2014 17:33:48 +0200 Subject: Fix GL context not being destroyed on win32 --- src/win32/mod.rs | 3 +++ 1 file changed, 3 insertions(+) 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); } } } -- cgit v1.2.3