From efa989aa19da60960d01ef923f7c0f771900a15f Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Mon, 14 Oct 2024 18:12:19 -0600 Subject: [PATCH] Reduce the scope of variables --- src/SFML/Window/EglContext.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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)); }