opengl: check for g_pHyprOpengl pointer (#9791)

restore the pointer check to avoid null ptr dereference on compositor
destruction.
This commit is contained in:
Tom Englund
2025-03-29 21:52:27 +01:00
committed by GitHub
parent 7374a023ef
commit 4a79eea6dc

View File

@@ -3175,7 +3175,7 @@ CEGLSync::~CEGLSync() {
if (sync == EGL_NO_SYNC_KHR)
return;
if (g_pHyprOpenGL->m_sProc.eglDestroySyncKHR(g_pHyprOpenGL->m_pEglDisplay, sync) != EGL_TRUE)
if (g_pHyprOpenGL && g_pHyprOpenGL->m_sProc.eglDestroySyncKHR(g_pHyprOpenGL->m_pEglDisplay, sync) != EGL_TRUE)
Debug::log(ERR, "eglDestroySyncKHR failed");
}