diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-12 14:02:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-12 17:44:40 +0300 |
commit | 301433fe9d3864a454f0d27b9e3809e8e2c76da6 (patch) | |
tree | 1289436de9859b98af56b942b9a6ec143fcdd5b6 /intern/ghost | |
parent | 3027ff8b13fb29e9249382ef400331783b2e06f6 (diff) |
Fix OpenGL Context freeing
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_ContextCGL.mm | 3 |
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); |