mirror of
https://github.com/swaywm/sway.git
synced 2025-11-27 06:59:53 -05:00
Use noop output when there's no outputs connected
Instead of having NULL workspace->output pointers, use a noop output. This should be safer.
This commit is contained in:
parent
ab0248a545
commit
2301349ad5
8 changed files with 29 additions and 28 deletions
|
|
@ -386,7 +386,7 @@ static void damage_handle_frame(struct wl_listener *listener, void *data) {
|
|||
void output_damage_whole(struct sway_output *output) {
|
||||
// The output can exist with no wlr_output if it's just been disconnected
|
||||
// and the transaction to evacuate it has't completed yet.
|
||||
if (output && output->wlr_output) {
|
||||
if (output && output->wlr_output && output->damage) {
|
||||
wlr_output_damage_add_whole(output->damage);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue