From: osa Date: Fri, 28 Feb 2014 06:17:21 +0000 (+0400) Subject: 0024671: TKOpenGl, OpenGl_Context - glGetPointerv might be called without GL context X-Git-Tag: V6_8_0_beta~515 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=f8c8ba7a6d9492a348d0d7a379ed145b82e511b3;p=occt-copy.git 0024671: TKOpenGl, OpenGl_Context - glGetPointerv might be called without GL context --- diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index fb9231821b..514ef1b6d2 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -148,7 +148,8 @@ OpenGl_Context::~OpenGl_Context() myDelayed.Nullify(); if (arbDbg != NULL - && caps->contextDebug) + && caps->contextDebug + && IsValid()) { // reset callback void* aPtr = NULL;