renderer: safeguard against non-sampleable currentFB in blurMainFb

fixes #8325
This commit is contained in:
Vaxry
2024-11-03 15:16:08 +00:00
parent 5833abbbd1
commit 180c26ada6
2 changed files with 11 additions and 0 deletions

View File

@@ -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() {