aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2019-01-10 09:20:07 +0100
committerLibravatar GitHub <noreply@github.com>2019-01-10 09:20:07 +0100
commit9abac85888da4b57a2cc708017318fee100e8b16 (patch)
treeccb41e3a18bc480b3fb9dd706285f96eefd82d80 /sway/input
parentMerge pull request #3396 from RedSoxFan/scroll-titlebar-border (diff)
parentFix segfaults on output destruction (diff)
downloadsway-9abac85888da4b57a2cc708017318fee100e8b16.tar.gz
sway-9abac85888da4b57a2cc708017318fee100e8b16.tar.zst
sway-9abac85888da4b57a2cc708017318fee100e8b16.zip
Merge pull request #3399 from RedSoxFan/fix-output-destruction-segfaults
Fix segfaults on output destruction
Diffstat (limited to 'sway/input')
-rw-r--r--sway/input/cursor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 07c3fe1d..409e7b12 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -85,6 +85,10 @@ static struct sway_node *node_at_coords(
85 return NULL; 85 return NULL;
86 } 86 }
87 struct sway_output *output = wlr_output->data; 87 struct sway_output *output = wlr_output->data;
88 if (!output) {
89 // output is being destroyed
90 return NULL;
91 }
88 double ox = lx, oy = ly; 92 double ox = lx, oy = ly;
89 wlr_output_layout_output_coords(root->output_layout, wlr_output, &ox, &oy); 93 wlr_output_layout_output_coords(root->output_layout, wlr_output, &ox, &oy);
90 94