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 | ab0248a54564b2f644b6fb367f9eb44fe0bf5f3c (diff) |
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) { 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); } } |