From 1840a907a8c6b1f59cfa6738a8f46b320e8df8b1 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Fri, 16 Aug 2024 11:09:01 +0200 Subject: [PATCH] renderbuffer: ensure framebuffer gets deleted (#7363) after commit 4b4971c it uses m_iFbAllocated and deletes if upon calling release() but Renderbuffer generates directly on m_iFb without calling alloc() meaning it wont be deleted on release(), set m_iFbAllocated to true after generating the buffer. --- src/render/Renderbuffer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/render/Renderbuffer.cpp b/src/render/Renderbuffer.cpp index 58ed88d6..c4425ce9 100644 --- a/src/render/Renderbuffer.cpp +++ b/src/render/Renderbuffer.cpp @@ -35,7 +35,8 @@ CRenderbuffer::CRenderbuffer(SP buffer, uint32_t format) : glBindRenderbuffer(GL_RENDERBUFFER, 0); glGenFramebuffers(1, &m_sFramebuffer.m_iFb); - m_sFramebuffer.m_vSize = buffer->size; + m_sFramebuffer.m_iFbAllocated = true; + m_sFramebuffer.m_vSize = buffer->size; m_sFramebuffer.bind(); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, m_iRBO);