mirror of
https://github.com/swaywm/sway.git
synced 2026-04-17 06:46:32 -04:00
The teardown of a sway_output is split in two: begin_destroy and
output_destroy. The former clears some state such as NULL'ing the
reference to wlr_output, while the latter frees the struct and its
remaining resources.
If an output is destroyed while a repaint timer is pending, future frame
callbacks will no longer occur as the listener is torn down in
begin_destroy, but the repaint timer is not torn down and may still
fire until output_destroy is hit. As begin_destroy cleared the reference
to wlr_output, this leads to a NULL-pointer dereference.
Tear down the repaint timer in begin_destroy as there is no need for it.
Fixes:
|
||
|---|---|---|
| .. | ||
| idle_inhibit_v1.c | ||
| launcher.c | ||
| layer_shell.c | ||
| output.c | ||
| tearing.c | ||
| transaction.c | ||
| xdg_shell.c | ||
| xwayland.c | ||