mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
cogl-auto-texture: Avoid a double-free crash
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. https://launchpad.net/bugs/1790525
This commit is contained in:
parent
b86d87453d
commit
d21478b0f0
@ -94,6 +94,7 @@ cogl_texture_new_with_size (unsigned int width,
|
||||
if (!cogl_texture_allocate (tex, &skip_error))
|
||||
{
|
||||
cogl_error_free (skip_error);
|
||||
skip_error = NULL;
|
||||
cogl_object_unref (tex);
|
||||
tex = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user