From db80f6a60fcb24b349e6a9765e49ee385adee89e Mon Sep 17 00:00:00 2001 From: binary1248 Date: Sat, 29 Dec 2018 13:36:01 +0100 Subject: [PATCH] Make sure setActive(false) is called before the surface is destroyed in EglContext. Fixes #1530. --- src/SFML/Window/EglContext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SFML/Window/EglContext.cpp b/src/SFML/Window/EglContext.cpp index fb91cdaca8..5c71f479e6 100644 --- a/src/SFML/Window/EglContext.cpp +++ b/src/SFML/Window/EglContext.cpp @@ -233,11 +233,11 @@ void EglContext::createSurface(EGLNativeWindowType window) //////////////////////////////////////////////////////////// void EglContext::destroySurface() { + // Ensure that this context is no longer active since our surface is going to be destroyed + setActive(false); + eglCheck(eglDestroySurface(m_display, m_surface)); m_surface = EGL_NO_SURFACE; - - // Ensure that this context is no longer active since our surface is now destroyed - setActive(false); }