mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 15:37:00 -05:00
background-image: Properly clear the failed to be filled texture pointer
Otherwise we'll unref and effectively free it, eventually resulting in use after free, causing wierd issues like crashes and infinite recursions. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1989726 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1979>
This commit is contained in:
parent
04994ebddf
commit
ef8c428ef9
@ -199,8 +199,9 @@ file_loaded (GObject *source_object,
|
||||
pixels, 0,
|
||||
&local_error))
|
||||
{
|
||||
g_warning ("Failed to create texture for background");
|
||||
cogl_object_unref (texture);
|
||||
g_warning ("Failed to create texture for background: %s",
|
||||
local_error->message);
|
||||
cogl_clear_object (&texture);
|
||||
}
|
||||
|
||||
image->texture = texture;
|
||||
|
Loading…
Reference in New Issue
Block a user