Skip to content

Commit a7988f5

Browse files
author
Francois Budin
committed
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.
1 parent 0ad8b9e commit a7988f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ void vtkXOpenGLRenderWindow::PopContext()
11941194
GLXContext current = glXGetCurrentContext();
11951195
GLXContext target = static_cast<GLXContext>(this->ContextStack.top());
11961196
this->ContextStack.pop();
1197-
if (target != current)
1197+
if (target && target != current)
11981198
{
11991199
glXMakeCurrent(this->DisplayStack.top(),
12001200
this->DrawableStack.top(),

0 commit comments

Comments
 (0)