aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/Framebuffer.cpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-11-03 15:16:08 +0000
committerVaxry <[email protected]>2024-11-03 15:16:13 +0000
commit180c26ada6233c3c59c331cb14a64aac1eeb2941 (patch)
tree2fe8800e6aad56482c5f015a5996a1b2a0937b2b /src/render/Framebuffer.cpp
parent5833abbbd11dca718379863cb2fb5c2423f5d7e7 (diff)
downloadHyprland-180c26ada6233c3c59c331cb14a64aac1eeb2941.tar.gz
Hyprland-180c26ada6233c3c59c331cb14a64aac1eeb2941.zip
renderer: safeguard against non-sampleable currentFB in blurMainFb
fixes #8325
Diffstat (limited to 'src/render/Framebuffer.cpp')
-rw-r--r--src/render/Framebuffer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/render/Framebuffer.cpp b/src/render/Framebuffer.cpp
index 814a3339..bf75d414 100644
--- a/src/render/Framebuffer.cpp
+++ b/src/render/Framebuffer.cpp
@@ -97,12 +97,18 @@ void CFramebuffer::bind() {
}
void CFramebuffer::release() {
+ if (!m_iFbAllocated && !m_cTex)
+ return;
+
+ Debug::log(TRACE, "fb {} released", m_iFb);
+
if (m_iFbAllocated)
glDeleteFramebuffers(1, &m_iFb);
m_cTex.reset();
m_iFbAllocated = false;
m_vSize = Vector2D();
+ m_iFb = 0;
}
CFramebuffer::~CFramebuffer() {