diff options
-rw-r--r-- | src/render/Framebuffer.cpp | 6 | ||||
-rw-r--r-- | src/render/OpenGL.cpp | 5 |
2 files changed, 11 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() { diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 415bb920..45837509 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -1656,6 +1656,11 @@ void CHyprOpenGLImpl::renderTextureMatte(SP<CTexture> tex, CBox* pBox, CFramebuf // Dual (or more) kawase blur CFramebuffer* CHyprOpenGLImpl::blurMainFramebufferWithDamage(float a, CRegion* originalDamage) { + if (!m_RenderData.currentFB->getTexture()) { + Debug::log(ERR, "BUG THIS: null fb texture while attempting to blur main fb?! (introspection off?!)"); + return &m_RenderData.pCurrentMonData->mirrorFB; // return something to sample from at least + } + TRACY_GPU_ZONE("RenderBlurMainFramebufferWithDamage"); const auto BLENDBEFORE = m_bBlend; |