cogl-framebuffer: Clear the renderbuffer list on failure
When try_creating_fbo fails it deletes any intermediate render buffers that were created. However it doesn't clear the list so I think if it failed a second time it would try to delete the render buffers again. This could potentially cause problems if a subsequent fbo is created because the destructor for the original might delete the renderbuffers of the new fbo.
This commit is contained in:
parent
570fa3f044
commit
a45f67bbdc
@ -432,6 +432,10 @@ try_creating_fbo (CoglOffscreen *offscreen,
|
|||||||
GLuint renderbuffer = GPOINTER_TO_UINT (l->data);
|
GLuint renderbuffer = GPOINTER_TO_UINT (l->data);
|
||||||
GE (glDeleteRenderbuffers (1, &renderbuffer));
|
GE (glDeleteRenderbuffers (1, &renderbuffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_slist_free (offscreen->renderbuffers);
|
||||||
|
offscreen->renderbuffers = NULL;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user