mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +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:
@@ -56,7 +56,7 @@ void OpenGl_CappingPlaneResource::Update (const Handle(OpenGl_Context)& theConte
|
||||
// function : Release
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void OpenGl_CappingPlaneResource::Release (const OpenGl_Context* theContext)
|
||||
void OpenGl_CappingPlaneResource::Release (OpenGl_Context* theContext)
|
||||
{
|
||||
OpenGl_Element::Destroy (theContext, myAspect);
|
||||
myEquationMod = (unsigned int )-1;
|
||||
@@ -83,7 +83,7 @@ void OpenGl_CappingPlaneResource::UpdateAspect (const Handle(OpenGl_Context)& th
|
||||
// no more used
|
||||
if (myAspect != NULL && aCappingAsp.IsNull())
|
||||
{
|
||||
OpenGl_Element::Destroy (theContext, myAspect);
|
||||
OpenGl_Element::Destroy (theContext.operator->(), myAspect);
|
||||
myAspectMod = myPlaneRoot->MCountAspect();
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user