Fixed OpenGL crash on canvas switch.

This commit is contained in:
Maciej Suminski 2016-06-13 09:35:36 +02:00
parent b09f079ab4
commit 57d4e8d51d
1 changed files with 2 additions and 1 deletions

View File

@ -162,7 +162,7 @@ OPENGL_GAL::~OPENGL_GAL()
if( glPrivContext != glMainContext )
GL_CONTEXT_MANAGER::Get().DestroyCtx( glPrivContext );
// Are destroying the last GAL instance?
// Are we destroying the last GAL instance?
if( instanceCounter == 0 )
{
GL_CONTEXT_MANAGER::Get().LockCtx( glMainContext );
@ -177,6 +177,7 @@ OPENGL_GAL::~OPENGL_GAL()
GL_CONTEXT_MANAGER::Get().UnlockCtx( glMainContext );
GL_CONTEXT_MANAGER::Get().DestroyCtx( glMainContext );
glMainContext = NULL;
}
}