projects
/
platform
/
core
/
csapi
/
opentk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5e9ae0
)
[Mac] Only dispose context on UI thread
author
thefiddler
<stapostol@gmail.com>
Wed, 23 Jul 2014 19:15:16 +0000
(21:15 +0200)
committer
thefiddler
<stapostol@gmail.com>
Wed, 23 Jul 2014 19:15:16 +0000
(21:15 +0200)
Source/OpenTK/Platform/MacOS/CocoaContext.cs
patch
|
blob
|
history
diff --git
a/Source/OpenTK/Platform/MacOS/CocoaContext.cs
b/Source/OpenTK/Platform/MacOS/CocoaContext.cs
index
89c17e4
..
58dcec2
100644
(file)
--- a/
Source/OpenTK/Platform/MacOS/CocoaContext.cs
+++ b/
Source/OpenTK/Platform/MacOS/CocoaContext.cs
@@
-333,6
+333,9
@@
namespace OpenTK
Debug.Print("Disposing of Cocoa context.");
+ if (!NSApplication.IsUIThread)
+ return;
+
Cocoa.SendVoid(NSOpenGLContext, Selector.Get("clearCurrentContext"));
Cocoa.SendVoid(Handle.Handle, Selector.Get("clearDrawable"));
Cocoa.SendVoid(Handle.Handle, Selector.Get("release"));