mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-18 15:07:08 +00:00
Move early return out of the autorelease pool.
This commit is contained in:
parent
af1e3bdf0f
commit
c02e959f7a
|
@ -340,18 +340,16 @@ namespace OpenTK
|
|||
|
||||
Debug.Print("Disposing of Cocoa context.");
|
||||
|
||||
if (!NSApplication.IsUIThread)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
using (var pool = new NSAutoreleasePool())
|
||||
{
|
||||
if (!NSApplication.IsUIThread)
|
||||
{
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if (IsCurrent)
|
||||
{
|
||||
Cocoa.SendVoid(NSOpenGLContext, Selector.Get("clearCurrentContext"));
|
||||
|
||||
}
|
||||
|
||||
Cocoa.SendVoid(Handle.Handle, Selector.Get("clearDrawable"));
|
||||
|
|
Loading…
Reference in a new issue