mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
wayland: avoid referencing unallocated memory when uninhibiting
This commit is contained in:
parent
a165bb9f46
commit
c8d991e4de
@ -122,7 +122,7 @@ gtk_application_impl_wayland_inhibit (GtkApplicationImpl *impl,
|
|||||||
if (!flags)
|
if (!flags)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
inhibitor = g_slice_new (GtkApplicationWaylandInhibitor);
|
inhibitor = g_slice_new0 (GtkApplicationWaylandInhibitor);
|
||||||
inhibitor->cookie = ++wayland->next_cookie;
|
inhibitor->cookie = ++wayland->next_cookie;
|
||||||
inhibitor->flags = flags;
|
inhibitor->flags = flags;
|
||||||
wayland->inhibitors = g_slist_prepend (wayland->inhibitors, inhibitor);
|
wayland->inhibitors = g_slist_prepend (wayland->inhibitors, inhibitor);
|
||||||
|
Loading…
Reference in New Issue
Block a user