Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-01-12 14:02:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-01-12 17:44:40 +0300
commit301433fe9d3864a454f0d27b9e3809e8e2c76da6 (patch)
tree1289436de9859b98af56b942b9a6ec143fcdd5b6 /intern
parent3027ff8b13fb29e9249382ef400331783b2e06f6 (diff)
Fix OpenGL Context freeing
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_ContextCGL.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm b/intern/ghost/intern/GHOST_ContextCGL.mm
index 37fd4a36ea4..0b290c617a5 100644
--- a/intern/ghost/intern/GHOST_ContextCGL.mm
+++ b/intern/ghost/intern/GHOST_ContextCGL.mm
@@ -75,9 +75,10 @@ GHOST_ContextCGL::GHOST_ContextCGL(
GHOST_ContextCGL::~GHOST_ContextCGL()
{
if (m_openGLContext != nil) {
- if (m_openGLContext == [NSOpenGLContext currentContext])
+ if (m_openGLContext == [NSOpenGLContext currentContext]) {
[NSOpenGLContext clearCurrentContext];
[m_openGLView clearGLContext];
+ }
if (m_openGLContext != s_sharedOpenGLContext || s_sharedCount == 1) {
assert(s_sharedCount > 0);