mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 07:51:28 +00:00
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.
This commit is contained in:
parent
7f8a47855c
commit
76210c141d
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue