Commit 61694e1f authored by Francois Budin's avatar Francois Budin Committed by David E. DeMarle

Check that context exists before trying to pop context.

On some linux drivers (such as nvidia version 384.111 and 387.34) setting the
context to zero causes a segfault so check before setting in cases where the
destruction may be trying to pop to a zero context.

(cherry picked from commit a7988f5c)
parent 3538ec08
......@@ -1151,7 +1151,7 @@ void vtkXOpenGLRenderWindow::PopContext()
GLXContext current = glXGetCurrentContext();
GLXContext target = static_cast<GLXContext>(this->ContextStack.top());
this->ContextStack.pop();
if (target != current)
if (target && target != current)
{
glXMakeCurrent(this->DisplayStack.top(),
this->DrawableStack.top(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment