From: osa Date: Fri, 4 Apr 2014 15:31:48 +0000 (+0400) Subject: 0024797: TKOpenGl, OpenGl_PointSprite - the assert is absent during incorrect object... X-Git-Tag: V6_8_0_beta~411 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=ea095e0edbbd9fd3f5bf73d8e29ae314080dea74;p=occt-copy.git 0024797: TKOpenGl, OpenGl_PointSprite - the assert is absent during incorrect object releasing. --- diff --git a/src/OpenGl/OpenGl_PointSprite.cxx b/src/OpenGl/OpenGl_PointSprite.cxx index f3577adbb4..430e196f66 100755 --- a/src/OpenGl/OpenGl_PointSprite.cxx +++ b/src/OpenGl/OpenGl_PointSprite.cxx @@ -53,6 +53,9 @@ void OpenGl_PointSprite::Release (const OpenGl_Context* theGlCtx) { if (myBitmapList != 0) { + Standard_ASSERT_RETURN (theGlCtx != NULL, + "OpenGl_PointSprite destroyed without GL context! Possible GPU memory leakage...",); + if (theGlCtx->IsValid()) { glDeleteLists (myBitmapList, 1);