From ba7f2a923f769af0d566da2397e7649f57c251f1 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 18 Feb 2015 08:58:37 +0100 Subject: Don't call MakeCurrent(null, null) when destroying --- src/x11/window/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/x11/window') diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index 0c501ff..05fcf14 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -59,7 +59,8 @@ unsafe impl Sync for Window {} impl Drop for XWindow { fn drop(&mut self) { unsafe { - ffi::glx::MakeCurrent(self.display, 0, ptr::null()); + // we don't call MakeCurrent(0, 0) because we are not sure that the context + // is still the current one ffi::glx::DestroyContext(self.display, self.context); if self.is_fullscreen { -- cgit v1.2.3