Reduce the scope of variables

This commit is contained in:
Chris Thrasher 2024-10-14 18:12:19 -06:00
parent f2f072333c
commit efa989aa19
No known key found for this signature in database
GPG Key ID: 56FB686C9DFC8E2C

View File

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