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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-01-12 14:02:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-01-20 12:18:22 +0300
commit0073b17d0336b1004c161f49f0f04f391d64d1f3 (patch)
treee09761eb7a029ffae5464c4decb4e46576540d34
parent324d0448b16e229d17fa620bc8950fe74f2eddac (diff)
Fix OpenGL Context freeing
-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 b96a1dc93de..8ddefb17bcd 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);