If texture allocation fails (e.g. on an old GPU with size limit 2048)
then `cogl_texture_new_with_size` was trying to use the same CoglError
twice. The second time was after it had already been freed.
Bug reported and fix provided by Gert van de Kraats.
Origin: https://gitlab.gnome.org/GNOME/mutter/commit/
d21478b0f
Bug-Ubuntu: https://launchpad.net/bugs/
1790525
Applied-upstream: 3.30.3
Gbp-Pq: Name cogl-auto-texture-Avoid-a-double-free-crash.patch
if (!cogl_texture_allocate (tex, &skip_error))
{
cogl_error_free (skip_error);
+ skip_error = NULL;
cogl_object_unref (tex);
tex = NULL;
}