]> OCCT Git - occt-copy.git/commitdiff
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)
committerabv <abv@opencascade.com>
Tue, 25 Mar 2014 12:50:22 +0000 (16:50 +0400)
src/OpenGl/OpenGl_Context.cxx

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