summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
authorLee Bousfield <ljbousfield@gmail.com>2025-04-18 10:37:51 -0500
committerGitHub <noreply@github.com>2025-04-18 17:37:51 +0200
commit7631d4c73f08217f3b8b78731e46a437319219da (patch)
tree620e65fbc0375bf68b78ae6d70ce0f7e14ec9ccb /src/render/OpenGL.cpp
parentddae3036ca6a1729ffe7854a59184116d2622809 (diff)
render, helpers: Call OpenGL destroyMonitorResources on disconnect (#10111)
* render, helpers: Call OpenGL destroyMonitorResources on disconnect * helpers: Add opengl null check
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r--src/render/OpenGL.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 27d3671f..754f3ff9 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -2997,7 +2997,7 @@ void CHyprOpenGLImpl::clearWithTex() {
}
}
-void CHyprOpenGLImpl::destroyMonitorResources(PHLMONITOR pMonitor) {
+void CHyprOpenGLImpl::destroyMonitorResources(PHLMONITORREF pMonitor) {
g_pHyprRenderer->makeEGLCurrent();
if (!g_pHyprOpenGL)
@@ -3021,7 +3021,8 @@ void CHyprOpenGLImpl::destroyMonitorResources(PHLMONITOR pMonitor) {
g_pHyprOpenGL->m_mMonitorBGFBs.erase(TEXIT);
}
- Debug::log(LOG, "Monitor {} -> destroyed all render data", pMonitor->szName);
+ if (pMonitor)
+ Debug::log(LOG, "Monitor {} -> destroyed all render data", pMonitor->szName);
}
void CHyprOpenGLImpl::saveMatrix() {