[linux] Don't manually activate context before destroying it

This commit is contained in:
John Firebaugh
2017-02-21 11:16:28 -08:00
parent 5b24b14741
commit 092213091b
2 changed files with 0 additions and 6 deletions

View File

@@ -12,9 +12,6 @@ struct OSMesaImpl : public HeadlessBackend::Impl {
}
~OSMesaImpl() {
if (glContext != OSMesaGetCurrentContext()) {
activateContext();
}
OSMesaDestroyContext(glContext);
}

View File

@@ -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");
}