mirror of
https://github.com/brl/mutter.git
synced 2025-07-06 19:09:51 +00: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:
@ -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;
|
||||
|
Reference in New Issue
Block a user