From ffd1308bbc494a6dab5344fa871287279f56bf18 Mon Sep 17 00:00:00 2001 From: Marien Zwart Date: Sun, 16 Sep 2018 23:20:58 +1000 Subject: Fix crash when destroying an idle-inhibiting client When destroying an idle-inhibiting client, idle_inhibit_v1_check_active can get called from transaction_progress_queue on a view with a null container. view_is_visible does not handle a view in this state. --- sway/desktop/idle_inhibit_v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/desktop/idle_inhibit_v1.c') diff --git a/sway/desktop/idle_inhibit_v1.c b/sway/desktop/idle_inhibit_v1.c index da17d0f2..17d4242b 100644 --- a/sway/desktop/idle_inhibit_v1.c +++ b/sway/desktop/idle_inhibit_v1.c @@ -44,7 +44,7 @@ void idle_inhibit_v1_check_active( struct sway_idle_inhibitor_v1 *inhibitor; bool inhibited = false; wl_list_for_each(inhibitor, &manager->inhibitors, link) { - if (!inhibitor->view) { + if (!inhibitor->view || !inhibitor->view->container) { /* Cannot guess if view is visible so assume it is */ inhibited = true; break; -- cgit v1.2.3-54-g00ecf