diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index 4baaaf1099..f577e7e5b4 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -146,7 +146,8 @@ OpenGl_Context::~OpenGl_Context() myDelayed.Nullify(); if (arbDbg != NULL - && caps->contextDebug) + && caps->contextDebug + && IsValid()) { // reset callback void* aPtr = NULL;