0024671: TKOpenGl, OpenGl_Context - glGetPointerv might be called without GL context
authorosa <osa@opencascade.com>
Fri, 28 Feb 2014 06:17:21 +0000 (10:17 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 6 Mar 2014 09:12:58 +0000 (13:12 +0400)
src/OpenGl/OpenGl_Context.cxx

index fb92318..514ef1b 100644 (file)
@@ -148,7 +148,8 @@ OpenGl_Context::~OpenGl_Context()
   myDelayed.Nullify();
 
   if (arbDbg != NULL
-   && caps->contextDebug)
+   && caps->contextDebug
+   && IsValid())
   {
     // reset callback
     void* aPtr = NULL;