aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2019-10-19 21:26:58 +0300
committerSimon Ser <contact@emersion.fr>2019-11-17 20:18:42 +0100
commit76210c141ddb931ea323c3363edc0e1c4431818e (patch)
treed48b7d579879fc66e0066148739266eff5ac6dd3 /sway/desktop
parent7f8a47855c13989d4ec5d477132d7e4310d1345c (diff)
output: check wlr_output in repaint handler
It's possible for the output to be disconnected in just the right moment for wlr_output to be NULL in the repaint handler, causing a crash. This check fixes that crash.
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/output.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 6498198b..dea087c6 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -508,6 +508,10 @@ static bool scan_out_fullscreen_view(struct sway_output *output,
int output_repaint_timer_handler(void *data) {
struct sway_output *output = data;
+ if (output->wlr_output == NULL) {
+ return 0;
+ }
+
output->wlr_output->block_idle_frame = false;
struct sway_workspace *workspace = output->current.active_workspace;