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:
Ryan Dwyer 2019-01-17 20:16:23 +10:00 committed by emersion
parent ab0248a545
commit 2301349ad5
8 changed files with 29 additions and 28 deletions

View file

@ -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);
}
}