wayland/idle-inhibit: Handle NULL inhibitor->actor

Fixes: a3c62bf8aa ("wayland/idle-inhibit: Add state tracking to fix races")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3444>
This commit is contained in:
Michel Dänzer 2023-12-06 15:34:47 +01:00 committed by Marge Bot
parent dfe4d218f1
commit 212283c13b

View File

@ -291,12 +291,16 @@ static void
attach_actor (MetaWaylandIdleInhibitor *inhibitor)
{
inhibitor->actor = meta_wayland_surface_get_actor (inhibitor->surface);
if (inhibitor->actor)
{
inhibitor->is_obscured_changed_handler =
g_signal_connect (inhibitor->actor, "notify::is-obscured",
G_CALLBACK (is_obscured_changed), inhibitor);
inhibitor->actor_destroyed_handler_id =
g_signal_connect (inhibitor->actor, "destroy",
G_CALLBACK (on_actor_destroyed), inhibitor);
}
}
static void