mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00: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:
@@ -378,14 +378,14 @@ void OpenGl_Group::Release (const Handle(OpenGl_Context)& theGlCtx)
|
||||
while (myFirst != NULL)
|
||||
{
|
||||
OpenGl_ElementNode* aNext = myFirst->next;
|
||||
OpenGl_Element::Destroy (theGlCtx, myFirst->elem);
|
||||
OpenGl_Element::Destroy (theGlCtx.operator->(), myFirst->elem);
|
||||
delete myFirst;
|
||||
myFirst = aNext;
|
||||
}
|
||||
myLast = NULL;
|
||||
|
||||
OpenGl_Element::Destroy (theGlCtx, myAspectLine);
|
||||
OpenGl_Element::Destroy (theGlCtx, myAspectFace);
|
||||
OpenGl_Element::Destroy (theGlCtx, myAspectMarker);
|
||||
OpenGl_Element::Destroy (theGlCtx, myAspectText);
|
||||
OpenGl_Element::Destroy (theGlCtx.operator->(), myAspectLine);
|
||||
OpenGl_Element::Destroy (theGlCtx.operator->(), myAspectFace);
|
||||
OpenGl_Element::Destroy (theGlCtx.operator->(), myAspectMarker);
|
||||
OpenGl_Element::Destroy (theGlCtx.operator->(), myAspectText);
|
||||
}
|
||||
|
Reference in New Issue
Block a user