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:
Neil Roberts 2010-09-06 17:18:11 +01:00
parent 570fa3f044
commit a45f67bbdc

View File

@ -432,6 +432,10 @@ try_creating_fbo (CoglOffscreen *offscreen,
GLuint renderbuffer = GPOINTER_TO_UINT (l->data);
GE (glDeleteRenderbuffers (1, &renderbuffer));
}
g_slist_free (offscreen->renderbuffers);
offscreen->renderbuffers = NULL;
return FALSE;
}