mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
0025133: TKOpenGl - Crash on closing a view containing presentations with capping
OpenGl_Element destruction and resource deallocation methods now accept a pointer to OpenGl_Context instead of a handle to avoid double deletion of the context.
This commit is contained in:
@@ -1505,11 +1505,11 @@ void OpenGl_AspectMarker::Render (const Handle(OpenGl_Workspace)& theWorkspace)
|
||||
// function : Release
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void OpenGl_AspectMarker::Release (const Handle(OpenGl_Context)& theCtx)
|
||||
void OpenGl_AspectMarker::Release (OpenGl_Context* theCtx)
|
||||
{
|
||||
if (!myResources.Sprite.IsNull())
|
||||
{
|
||||
if (!theCtx.IsNull())
|
||||
if (theCtx)
|
||||
{
|
||||
if (myResources.SpriteKey.IsEmpty())
|
||||
{
|
||||
@@ -1531,7 +1531,7 @@ void OpenGl_AspectMarker::Release (const Handle(OpenGl_Context)& theCtx)
|
||||
myResources.SpriteAKey.Clear();
|
||||
myResources.ResetSpriteReadiness();
|
||||
|
||||
if (!myResources.ShaderProgram.IsNull() && !theCtx.IsNull())
|
||||
if (!myResources.ShaderProgram.IsNull() && theCtx)
|
||||
{
|
||||
theCtx->ShaderManager()->Unregister (myResources.ShaderProgramId,
|
||||
myResources.ShaderProgram);
|
||||
|
||||
Reference in New Issue
Block a user