mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024297: OpenGl_Texture::Release() might call OpenGL functions without active context
Add check to Release() method of OpenGl_Texture, OpenGl_ShaderObject, OpenGl_ShaderProgram
This commit is contained in:
@@ -1120,7 +1120,8 @@ void OpenGl_ShaderProgram::Release (const OpenGl_Context* theCtx)
|
||||
anIter.ChangeValue().Nullify();
|
||||
}
|
||||
|
||||
if (theCtx->core20 != NULL)
|
||||
if (theCtx->core20 != NULL
|
||||
&& theCtx->IsValid())
|
||||
{
|
||||
theCtx->core20->glDeleteProgram (myProgramID);
|
||||
}
|
||||
|
Reference in New Issue
Block a user