From 4a79eea6dc7a2b121fc9ce9a3c9ecd0a89666dd8 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Sat, 29 Mar 2025 21:52:27 +0100 Subject: [PATCH] opengl: check for g_pHyprOpengl pointer (#9791) restore the pointer check to avoid null ptr dereference on compositor destruction. --- src/render/OpenGL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 2c455ba0..2a3723bd 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -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"); }