summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/OpenGL.cpp5
-rw-r--r--src/render/OpenGL.hpp2
2 files changed, 4 insertions, 3 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() {
diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp
index 17ef4f5f..276d5268 100644
--- a/src/render/OpenGL.hpp
+++ b/src/render/OpenGL.hpp
@@ -207,7 +207,7 @@ class CHyprOpenGLImpl {
void scissor(const pixman_box32*, bool transform = true);
void scissor(const int x, const int y, const int w, const int h, bool transform = true);
- void destroyMonitorResources(PHLMONITOR);
+ void destroyMonitorResources(PHLMONITORREF);
void markBlurDirtyForMonitor(PHLMONITOR);