diff --git a/src/SFML/Window/EglContext.cpp b/src/SFML/Window/EglContext.cpp index 9bb62e5ef..a09911a4c 100644 --- a/src/SFML/Window/EglContext.cpp +++ b/src/SFML/Window/EglContext.cpp @@ -191,9 +191,7 @@ EglContext::~EglContext() cleanupUnsharedResources(); // Deactivate the current context - const EGLContext currentContext = eglCheck(eglGetCurrentContext()); - - if (currentContext == m_context) + if (eglCheck(eglGetCurrentContext()) == m_context) { eglCheck(eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)); }