mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-23 14:48:24 +00:00
gl_engine: Fix GlRenderTarget reset function
- Avoid deleting the framebuffer when mFbo == GL_INVALID_VALUE, as this is not a valid framebuffer object.
This commit is contained in:
parent
a79f9788c1
commit
3ca2c0edfd
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ void GlRenderTarget::init(uint32_t width, uint32_t height, GLint resolveId)
|
|||
|
||||
void GlRenderTarget::reset()
|
||||
{
|
||||
if (mFbo == 0) return;
|
||||
if (mFbo == 0 || mFbo == GL_INVALID_VALUE) return;
|
||||
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, 0));
|
||||
GL_CHECK(glDeleteFramebuffers(1, &mFbo));
|
||||
GL_CHECK(glDeleteRenderbuffers(1, &mColorBuffer));
|
||||
|
|
Loading…
Add table
Reference in a new issue