diff --git a/src/OpenGl/OpenGl_Sampler.cxx b/src/OpenGl/OpenGl_Sampler.cxx index 24b69b65fa..54c1e25f07 100644 --- a/src/OpenGl/OpenGl_Sampler.cxx +++ b/src/OpenGl/OpenGl_Sampler.cxx @@ -418,7 +418,8 @@ void OpenGl_Sampler::resetGlobalTextureParams (const Handle(OpenGl_Context)& the { theCtx->core11fwd->glDisable (GL_TEXTURE_GEN_S); theCtx->core11fwd->glDisable (GL_TEXTURE_GEN_T); - if (theParams->GenMode() == Graphic3d_TOTM_SPRITE) + if (theParams->GenMode() == Graphic3d_TOTM_SPRITE + && theCtx->core20fwd != NULL) { theCtx->core11fwd->glDisable (GL_POINT_SPRITE); }