Skip to content

Commit

Permalink
Make sure setActive(false) is called before the surface is destroyed …
Browse files Browse the repository at this point in the history
…in EglContext. Fixes SFML#1530.
  • Loading branch information
binary1248 authored and Unarelith committed May 28, 2020
1 parent 90a5d68 commit a6868ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SFML/Window/EglContext.cpp
Expand Up @@ -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);
}


Expand Down

0 comments on commit a6868ff

Please sign in to comment.