diff --git a/Rendering/OpenGL2/vtkTextureObject.cxx b/Rendering/OpenGL2/vtkTextureObject.cxx index 36ddbf80ef17385598665bc926007fcecaeef4c5..efab7f6e0ec244f32a43fe2affc3c3deed3359d3 100644 --- a/Rendering/OpenGL2/vtkTextureObject.cxx +++ b/Rendering/OpenGL2/vtkTextureObject.cxx @@ -387,8 +387,11 @@ int vtkTextureObject::GetTextureUnit() void vtkTextureObject::Activate() { // activate a free texture unit for this texture - this->Context->ActivateTexture(this); - this->Bind(); + if (this->Context) + { + this->Context->ActivateTexture(this); + this->Bind(); + } } //------------------------------------------------------------------------------