diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index b0cf366c1..85f61ffaf 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -4141,7 +4141,8 @@ namespace bgfx { namespace gl if (m_srgbWriteControlSupport) { - if (0 == m_currentFbo) + if (0 == m_currentFbo + || !isValid(_fbh) ) { const uint32_t surfaceFlags = isValid(_fbh) ? m_frameBuffers[_fbh.idx].m_desc.flags