internal: various improvements to avoid crashes on exit

This commit is contained in:
Vaxry
2023-12-06 14:46:18 +00:00
parent 13b4c6de86
commit 03c6f4506a
6 changed files with 18 additions and 1 deletions

View File

@@ -9,6 +9,9 @@ SLayerSurface::SLayerSurface() {
}
SLayerSurface::~SLayerSurface() {
if (!g_pHyprOpenGL)
return;
g_pHyprRenderer->makeEGLCurrent();
std::erase_if(g_pHyprOpenGL->m_mLayerFramebuffers, [&](const auto& other) { return other.first == this; });
}