summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-03-29 21:52:27 +0100
committerGitHub <noreply@github.com>2025-03-29 21:52:27 +0100
commit4a79eea6dc7a2b121fc9ce9a3c9ecd0a89666dd8 (patch)
treeef4630d7c15b256ec8d45a5190a7d939d23a4359 /src/render/OpenGL.cpp
parent7374a023eff964817c9e5fbe75a661540516f798 (diff)
opengl: check for g_pHyprOpengl pointer (#9791)
restore the pointer check to avoid null ptr dereference on compositor destruction.
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r--src/render/OpenGL.cpp2
1 files changed, 1 insertions, 1 deletions
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");
}