From af1e3bdf0f7f318660553e3632513166c5571c4b Mon Sep 17 00:00:00 2001 From: Jarl Gullberg Date: Fri, 4 Aug 2017 17:41:45 +0200 Subject: [PATCH] Correct screwy formatting. --- src/OpenTK/Platform/MacOS/CocoaContext.cs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/OpenTK/Platform/MacOS/CocoaContext.cs b/src/OpenTK/Platform/MacOS/CocoaContext.cs index 850cd109..67b68cb1 100644 --- a/src/OpenTK/Platform/MacOS/CocoaContext.cs +++ b/src/OpenTK/Platform/MacOS/CocoaContext.cs @@ -341,15 +341,21 @@ namespace OpenTK Debug.Print("Disposing of Cocoa context."); using (var pool = new NSAutoreleasePool()) - {if (!NSApplication.IsUIThread) - { return;} + { + if (!NSApplication.IsUIThread) + { + return; - if (IsCurrent) - { Cocoa.SendVoid(NSOpenGLContext, Selector.Get("clearCurrentContext"));} - Cocoa.SendVoid(Handle.Handle, Selector.Get("clearDrawable")); - Cocoa.SendVoid(Handle.Handle, Selector.Get("release")); + } + if (IsCurrent) + { + Cocoa.SendVoid(NSOpenGLContext, Selector.Get("clearCurrentContext")); + } + + Cocoa.SendVoid(Handle.Handle, Selector.Get("clearDrawable")); + Cocoa.SendVoid(Handle.Handle, Selector.Get("release")); } Handle = ContextHandle.Zero;