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;