aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/idle_inhibit_v1.c
diff options
context:
space:
mode:
authorLibravatar Marien Zwart <marienz@google.com>2018-09-16 23:20:58 +1000
committerLibravatar Marien Zwart <marienz@google.com>2018-09-16 23:20:58 +1000
commitffd1308bbc494a6dab5344fa871287279f56bf18 (patch)
tree5e6e36a9f7ca8bf6a9fb42f1c2f3ad223b86151f /sway/desktop/idle_inhibit_v1.c
parentMerge pull request #2638 from RyanDwyer/fix-tab-unmap-crash (diff)
downloadsway-ffd1308bbc494a6dab5344fa871287279f56bf18.tar.gz
sway-ffd1308bbc494a6dab5344fa871287279f56bf18.tar.zst
sway-ffd1308bbc494a6dab5344fa871287279f56bf18.zip
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.
Diffstat (limited to 'sway/desktop/idle_inhibit_v1.c')
-rw-r--r--sway/desktop/idle_inhibit_v1.c2
1 files changed, 1 insertions, 1 deletions
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(
44 struct sway_idle_inhibitor_v1 *inhibitor; 44 struct sway_idle_inhibitor_v1 *inhibitor;
45 bool inhibited = false; 45 bool inhibited = false;
46 wl_list_for_each(inhibitor, &manager->inhibitors, link) { 46 wl_list_for_each(inhibitor, &manager->inhibitors, link) {
47 if (!inhibitor->view) { 47 if (!inhibitor->view || !inhibitor->view->container) {
48 /* Cannot guess if view is visible so assume it is */ 48 /* Cannot guess if view is visible so assume it is */
49 inhibited = true; 49 inhibited = true;
50 break; 50 break;