0024797: TKOpenGl, OpenGl_PointSprite - the assert is absent during incorrect object...
authorosa <osa@opencascade.com>
Fri, 4 Apr 2014 15:31:48 +0000 (19:31 +0400)
committerapn <apn@opencascade.com>
Thu, 10 Apr 2014 15:21:19 +0000 (19:21 +0400)
src/OpenGl/OpenGl_PointSprite.cxx

index f3577ad..430e196 100755 (executable)
@@ -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);