Commit: 0073b17d0336b1004c161f49f0f04f391d64d1f3
Author: Campbell Barton
Date:   Mon Jan 12 22:02:06 2015 +1100
Branches: blender-v2.73-release
https://developer.blender.org/rB0073b17d0336b1004c161f49f0f04f391d64d1f3

Fix OpenGL Context freeing

===================================================================

M       intern/ghost/intern/GHOST_ContextCGL.mm

===================================================================

diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm 
b/intern/ghost/intern/GHOST_ContextCGL.mm
index b96a1dc..8ddefb1 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);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to