diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2019-01-17 20:16:23 +1000 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-01-22 09:55:13 +0100 |
commit | 2301349ad59751640ed9e59dd22edeafaf09da39 (patch) | |
tree | 1726c2f8ec1cd9baaf27fbed62aa6a337bc85ce7 /sway/desktop/output.c | |
parent | seat_create: set initial focus for added seats (diff) | |
download | sway-2301349ad59751640ed9e59dd22edeafaf09da39.tar.gz sway-2301349ad59751640ed9e59dd22edeafaf09da39.tar.zst sway-2301349ad59751640ed9e59dd22edeafaf09da39.zip |
Use noop output when there's no outputs connected
Instead of having NULL workspace->output pointers, use a noop output.
This should be safer.
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index edf77fbc..f18a118f 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -386,7 +386,7 @@ static void damage_handle_frame(struct wl_listener *listener, void *data) { | |||
386 | void output_damage_whole(struct sway_output *output) { | 386 | void output_damage_whole(struct sway_output *output) { |
387 | // The output can exist with no wlr_output if it's just been disconnected | 387 | // The output can exist with no wlr_output if it's just been disconnected |
388 | // and the transaction to evacuate it has't completed yet. | 388 | // and the transaction to evacuate it has't completed yet. |
389 | if (output && output->wlr_output) { | 389 | if (output && output->wlr_output && output->damage) { |
390 | wlr_output_damage_add_whole(output->damage); | 390 | wlr_output_damage_add_whole(output->damage); |
391 | } | 391 | } |
392 | } | 392 | } |