[linux] Don't manually activate context before destroying it
This commit is contained in:
@@ -12,9 +12,6 @@ struct OSMesaImpl : public HeadlessBackend::Impl {
|
||||
}
|
||||
|
||||
~OSMesaImpl() {
|
||||
if (glContext != OSMesaGetCurrentContext()) {
|
||||
activateContext();
|
||||
}
|
||||
OSMesaDestroyContext(glContext);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,9 +31,6 @@ struct EGLImpl : public HeadlessBackend::Impl {
|
||||
}
|
||||
|
||||
~EGLImpl() {
|
||||
if (glContext != eglGetCurrentContext()) {
|
||||
activateContext();
|
||||
}
|
||||
if (!eglDestroyContext(display, glContext)) {
|
||||
throw std::runtime_error("Failed to destroy EGL context.\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user