Skip to content
Snippets Groups Projects
Commit 61694e1f authored by Francois Budin's avatar Francois Budin Committed by David E. DeMarle
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -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(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment